|
[Sponsors] | |||||
|
|
|
#1 |
|
Senior Member
Dragos
Join Date: Mar 2009
Posts: 637
Rep Power: 9 ![]() |
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 |
|
|
|
|
|
|
|
|
#2 |
|
Super Moderator
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 13 ![]() |
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) |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Dragos
Join Date: Mar 2009
Posts: 637
Rep Power: 9 ![]() |
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 |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| time varying boundary condition | cfd-student | CFX | 0 | April 15, 2008 08:31 |
| Boundary condition of the third kind or Danckwertz boundary condition | plage | OpenFOAM Running, Solving & CFD | 4 | October 3, 2006 12:21 |
| How to set a boundary condition as a function respect to time | chnrdu | OpenFOAM Running, Solving & CFD | 2 | June 17, 2005 04:18 |
| time varying boundary condition | co2 | FLUENT | 2 | November 11, 2003 12:36 |
| BOUNDARY CONDITION THAT CHANGES WITH TIME | George | CFX | 1 | August 29, 2003 10:12 |