Hello everybody,
I try to set
Hello everybody,
I try to set up a new unsteady boundary condition by deriving it from the fixeValueFvPatchField, and I need to preserve some values between at least two time steps. For that I want to know how long such an object lives? Does it stay in memory between two time steps or I have to use some sort of "static" declaration for the variables I want to preserve? Another question is that I want to enforce the usage of this boundary only for temperature fields. I suspect I have to use the dimensions for this but can anyone show me how to do that? Thank you, Dragos |
The object lives as long as yo
The object lives as long as your time scheme. It will get renamed so after a ddt operation your old U becomes U_0 (and for second order time scheme U_0 will become U_00).
Just add a Pout<< mesh.names()<< endl; before and after a ddt operation and you'll see. (all objects are registered with the mesh and the 'names()' returns the names of these) |
Thanks Mattijs,
That is good
Thanks Mattijs,
That is good to know! But my concern was a litle bit different: I have a class derived directly from fixedValueFvPatchField, and inside that class I define a member scalar. I was wondering if the value of that scalar is preserved from one iteration to another. Judging from your answer, I think yes! Dragos |
All times are GMT -4. The time now is 09:04. |