ProposedPCApproach_Rev4
ProposedPCApproach_Rev4
Initialization
At time , an input-output solve from Step 3 is performed where and are replaced with
Time Stepping
Data known at :
for all .
counter) and extrapolate all inputs to yield predicted input values at , i.e.,
for all .
Advance the state of all partitions to yield state and constraint values at , i.e.,
for all .
*
may also be saved in if a module uses a multi-step method.
Option 1: Solve for consistent inputs and outputs, which is required when has direct feedthrough in
modules coupled together.
Solve for consistent inputs and outputs based on the states at using a root-finding algorithm, i.e.,
solve
, or equivalently,
for , which also gives . represents a call to each module’s . For Newton’s
method this would be:
The Jacobian can be computed directly if all Jacobians are available to the glue code,
,
or numerically,
where is a vector of zeros with the th element equal to 1 and is a perturbation of the th
input.
Option 2: Solve inputs only based on the current outputs, which is an approach much faster than Option
1 and can be used when the modules coupled together do not have direct feedthrough.
Solve for inputs from current outputs based on the states and current inputs at using a root-finding
algorithm, i.e., solve
, or equivalently,
†
For a trivial , such as , where , this reduces to
.
,
For modules with time steps larger than the coupling step (L = 1 for identical, L = 2 for two times, etc.),
the following algorithm is suggested.
Note:
*Corrections would be expensive (and may counter the benefit of a larger time step) because they
would require N*(C+1) calls to _UpdateStates, where N is the number of glue code time steps and C is
the number of corrections (C=0 represents a prediction step only). It may be preferable to not correct
modules with a time step larger than the glue code time step, which then only requires N/L calls to
_UpdateStates. That is, adding corrections requires L*(C+1) times as many calls to _UpdateStates.
Incidentally, this is the same number of calls to _UpdateStates that is required with time-step subcycling
(where L is the integer number of module steps within the glue code step), but each step of the later is
of a smaller time step.
*Option 2 would work poorly for modules with strong direct feedthrough.
1. Extrapolate inputs (likely based on inputs stored at the module’s time step)
2. Advance states
3. Input-Output solve
Option 2: Solve for y_n+L, interpolate to find y_n+1, then solve for u_n+1:
Option 1:
Solve for u and y at substeps t_n+1 where t_n < t_n+1 <= t_n+L by only calling CalcOutput at
n+L: