next up previous
Next: Mixing sequential and parallel Up: Coupling algorithms - SEQ Previous: The sequence concept


A mix of lag and sequence: the sequential coupled model

One can run the same component models simultaneously or sequentially by defining the appropriate LAG and SEQ indices. In the example illustrated on figure 4.7, the models perform their prism_put_proto and prism_get_proto calls exactly as in the first lag example above: model A receives $F_2$ and then sends $F_1$; its timestep length is 4. During a coupling timestep, model B receives $F_1$ and then sends $F_2$; its timestep length is 6. $F_1$ and $F_2$ coupling periods are both 12. By defining a LAG index of -8 for $F_1$, the models will now run sequentially.

Figure 4.7: Mix of LAF and SEQ concepts
\includegraphics[scale=.6]{fig_mix_seqlag.eps}

As the LAG for $F_2$ is positive (6), a reading of $F_2$ in its coupling restart file is automatically performed below the initial prism_get_proto. As the LAG for $F_1$ is negative (-8), no reading from file is performed initially and model B waits; at time 8, a sending action is effectively performed below model A $F_1$ prism_put_proto (as 8 + LAG (-8) = 0 which is the first coupling timestep) and matches the initial model B $F_1$ prism_get_proto. Below the last model A $F_1$ prism_put_proto of the run at time 116, a sending action is effectively performed, as $116 + LAG(-8) = 108$ is a coupling period (as the LAG is negative, the field is not written to its coupling restart file). Below the last model B $F_2$ prism_put_proto of the run at time 114, a writing of $F_2$ to its restart file is performed, as $114 + LAG(6) = 120$ is a coupling period and as the LAG is positive.

If the coupling fields are transformed through OASIS3 main process, it is important to indicate a sequence index. In fact, at each OASIS3 main process coupling timestep, $F_1$ is necessarily treated after $F_2$. Therefore, $SEQ(F_1) = 2$ and $SEQ(F_2) = 1$.


next up previous
Next: Mixing sequential and parallel Up: Coupling algorithms - SEQ Previous: The sequence concept
Reinhard Budich 2004-12-22