|
[Sponsors] |
what is the purpose of rhoMin and rhoMax in fvsolution |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 29, 2012, 11:09 |
what is the purpose of rhoMin and rhoMax in fvsolution
|
#1 |
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 16 |
I noticed the simulation aborts if the limits are breached, but why are units specified there as well?
rhoMin rhoMin [1 -3 0 0 0] 0.01; rhoMax rhoMax [1 -3 0 0 0] 100.0; |
|
June 30, 2012, 08:12 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Mihai,
The units are probably supplied for the sake of completeness, while also making it easier to access when reading the dictionary file. This way it's not necessary to first read the value to a "scalar" variable and then add dimensions by creating a "dimensionedScalar" based on the first one. These dimensions are necessary for field operations, since the "rho" field has dimensions itself. Best regards, Bruno
__________________
|
|
July 2, 2012, 10:06 |
|
#3 |
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 16 |
I think I understand. Is it because rho is derived?
|
|
July 2, 2012, 10:19 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Example: https://github.com/OpenFOAM/OpenFOAM...createFields.H
Code:
autoPtr<basicPsiThermo> pThermo ( basicPsiThermo::New(mesh) ); basicPsiThermo& thermo = pThermo(); volScalarField rho ( IOobject ( "rho", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), thermo.rho() ); //.... dimensionedScalar rhoMax(simple.dict().lookup("rhoMax")); dimensionedScalar rhoMin(simple.dict().lookup("rhoMin")); edit: forgot to mention: rho is used here: https://github.com/OpenFOAM/OpenFOAM...pleFoam/pEqn.H
__________________
Last edited by wyldckat; July 2, 2012 at 10:20. Reason: see "edit:" |
|
|
|