CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   TwoPhaseProperties (https://www.cfd-online.com/Forums/openfoam-solving/58328-twophaseproperties.html)

 sega November 17, 2008 12:26

Hello. I'm getting an outpu

Hello.

I'm getting an output in one of my self-made tools:

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian

I think its because if using

const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();

Can anybody tell from in which file this ouput is generated?
I want to suppress it by uncommenting the corrosponding Info code.

Thanks so far!

 isabel July 16, 2009 04:22

I think the file is generated by twoPhaseMixture.H and twoPhaseMixture.C
Am I wrong?

 feijooos July 18, 2009 11:19

the output is created by the newViscosityModel.C file

transportModels/incompressible/viscosityModels/viscosityModel/newViscosityModel.C on line 48

 isabel July 22, 2009 03:21

Do you know what this interFoam line means: ?

twoPhaseProperties.correct();

 kathrin_kissling July 22, 2009 09:03

Dear Isabel,

twoPhaseProperties.correct() calls a funktion you can find in twoPhaseMixture.H

twoPhaseProperties.correct() calculates the laminar viscosity by calling calcNu(), which is defined in twoPhaseMixture.C.

calcNu() calculates the kinematic viscosity nu_ which is defined as the volume averaged dynamic viscosity mu_ divided by the volume averaged density.

mu_ is also calculated in twoPhaseMixture.C as mu_ = gamma * rho1_ *nuModel1_->nu() + (scalar(1)- gamma)*rho2_nuModel2_->nu()
mu_ is the volume averaged dynamic viscosity

I hope this helps you.

Regards

Kathrin

 sandy July 22, 2009 18:09

What is the difference between twoPhaseProperties.correct() and twoPhaseProperties->correct() ? When should we use Ptr -> ?

In addition, what is turbulence->correct() ?

 Saideep June 1, 2015 12:27

Newer Version for the .correct() function.

Hi guys,

just to comment here. I see this as an old post and I had some trouble linking it with the new versions. The functions look alike but the directories seems to have changed.

The correct function is called from the incompressibleTwoPhaseMixture.H file under the code:
virtual void correct(){calcNu();}

What is really doing? it is finding the kinetic viscosity by dividing the laminar viscosity by the average density:

// Average kinematic viscosity calculated from dynamic viscositynu_ = mu()/(limitedAlpha1*rho1_ + (scalar(1) - limitedAlpha1)*rho2_);

for further reference please lookup in the github page specified here:
https://github.com/OpenFOAM/OpenFOAM...PhaseMixture.C

Saideep

 All times are GMT -4. The time now is 01:58.