CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Accessing The Two Phase Properties (http://www.cfd-online.com/Forums/openfoam-solving/58880-accessing-two-phase-properties.html)

miliante May 19, 2008 08:51

People from here, How do
 
People from here,

How do I access each phase property? Like rho, mu and nu? In my case for air and water, which I've set in the transportProperties file.

Thanks in advance.

miliante.

su_junwei May 19, 2008 19:44

which solver? try below dime
 
which solver?
try below
dimensionedScalar rho(transportProperties.lookup("rho"));
or
dimensionedScalar rho;
rho=dimensionedScalar(transportProperties.lookup(" rtho"));

Su Junwei

abe June 19, 2013 07:55

Hi Junwei,

I need to call twoPhaseProperties inside a turbulence model (k omega sst). I mean inside ' void kOmegaSSTRebound::correct()'

How would it be possible?

I have tried the following but wiothout success.
const dimensionedScalar& rho1 = transport_.rho1();
or
dimensionedScalar rho1(transportProperties.subDict("phase1").lookup( "rho"));

nimasam June 19, 2013 08:35

did you introduce following objects:transport_ , transportProperties in your code?
if not, then how do you want to call a member of it?

abe June 19, 2013 08:52

Hi Nimasam,

Thanks for your comment.
The rho1, and rho2 can be called through twoPhaseProperties. And if one follows the hierarchy (creatFields.H, then turbulenceModel.C, then RansModel.C, and finally kOmegaSST.C), it can be seen that twoPhaseProperties has passed inside the kOmegaSST.C by the name of 'transport':
kOmegaSST::kOmegaSST
(
const volVectorField& U,
const surfaceScalarField& phi,
transportModel& transport,
const word& turbulenceModelName,
const word& modelName
)

However, I do not still know how to use it. Any comment is highly appreciated.

ABE

nimasam June 20, 2013 05:04

you can use following structure to read from dict:

Quote:

rho1_
(
dimensioned<scalar>::lookupOrAddToDict
(
"rho1",
coeffDict_,
1.0 //your default value
)
),
transportModel class has no member which pointed to transportProperties dict


All times are GMT -4. The time now is 17:33.