Understanding the taylor-green script

I am trying to understand how to script a transient problem, thus looking into the examples and found taylor-green.

Here I didn’t understand 2 things:

  1. Why we made 2 domains?
    # make initial condition domain
    ic_domain = Domain("initial_conditions")

    # make moving window domain
    window_domain = Domain("window")
  1. Couldn’t find the expression for “u_prev_step_diff” and all but in the below script they are defined.
    # make constraint for matching previous windows initial condition
    ic = PointwiseInteriorConstraint(
        outvar={"u_prev_step_diff": 0, "v_prev_step_diff": 0, "w_prev_step_diff": 0},
            "u_prev_step_diff": 100,
            "v_prev_step_diff": 100,
            "w_prev_step_diff": 100,
        parameterization={t_symbol: 0},
    window_domain.add_constraint(ic, name="ic")

Could you please provide some reading on the same so I can understand this better?

Thank you

Hi @ngeneva, could you please suggest some resources that could help me understand the 2 problems/ doubts I am facing?

Thank you for your time


Hi @nihalpushkar11

The Taylor-Green implementation is pretty specific and I would first evaluate what type of dynamical system you are trying to learn. You can easily define time as another input variable to any PINNs example. E.g. wave equation.

Regardless please see the documentation for this problem for some details. Responses to questions are below:

  1. Why we made 2 domains?

One for the initial state and the other for the current time window. This is because the initial state has a different (analytical function) constraint than the time-window constraints (N-S PDE and others).

  1. Couldn’t find the expression for “u_prev_step_diff” and all but in the below script they are defined.

These are generated under the hood when using a moving time window architecture. Basically this model wrapper will store two models (one of the current time window and the previous) and return the difference in predictions between the two models. So this constraint is imposing continuity between time windows.

hi @ngeneva,
Thank you for the reply. I went through the scripts on “MovingFrame” there I found how the “_prev_step” & “_prev_step_diff” are been defined.

Thanks and regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.