>
> For EulerEquations or ReactiveEulerEquations
> can one have more than one add2W statement,
> i.e. is it possible to add more than one new variable to
> the solution vector?
> The example i have in mind is this,
> currently I have something along the lines
> ReactiveEulerEquations {
> space=2D
> add2W=PVORT
> }
> and I have a procedure which after n timesteps plots the PVORT field
> e.g. with statements like
> minmax W::PVORT[] -> minmax.
> Now I want an additonal field, NVORT say so I tried
> ReactiveEulerEquations {
> space=2D
> add2W=PVORT
> add2W=NVORT
> }
> without any other changes to the code
> and get:
> expression 'W::PVORT[]' is undefined!
The above won't work as add2W is a procedure parameter
and so the second entry simply overwrites the first.
What you need to do is write:
ReactiveEulerEquations {
space = 2D
add2W = PVORT,NVORT
}
And if you take a look at:
$AMRITA/stdlib/equations/Add2W.amr
you'll see that it loops over the supplied parameter
adding named entries to the solution vector.
>
> On a similar vein, can one have more than one
> auxcode in BCG.
> e.g. I currently have
> BasicCodeGenerator {
> scheme = roe'$znd::model
> solver = 1step
> auxcode = code/pvort_trace
> }
> where the code pvort_trace is the routine which
> updates the W::PVORT variable field.
> If I wanted to evaluate a 2nd variable field
> (NVORT say) is it acceptable to daisy chain
> a second piece of code
> BasicCodeGenerator {
> scheme = roe'$znd::model
> solver = 1step
> auxcode = code/pvort_trace
> auxcode = code/nvort_trace
> }
> say, or does one of the auxcode statements
> just overwrite the other?
Again you could answer this question by delving into
the bowls of BCG. As before, the second auxcode
will overwrite the first. And if you take a look at:
$AMRITA/plugin/amr_sol/BCG/equations/ReactiveEulerEquations/AddAuxiliaryCode.amr
you'll see that it loops over supplied filenames and
so you could write:
BasicCodeGenerator {
scheme = roe'1a
solver = 1step
auxcode = code/pvort_trace,code/nvort_trace
}
James