CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   TwoLiquidMixingFoam (https://www.cfd-online.com/Forums/openfoam-solving/59851-twoliquidmixingfoam.html)

alberto July 16, 2011 02:10

The version of twoLiquidMixingFoam in OpenFOAM 2.0 already uses PIMPLE. A tutorial was added today to 2.0.x (in git repository). Maybe take a look.

Best,

gwierink July 16, 2011 03:03

Hi Tanay,

It would be helpful to post the compile error. But just guessing from

Quote:

Originally Posted by Tanay (Post 316205)
surfaceScalarField muEff ("muEff", (alpha1*mu1 + (scalar(1)-alpha1)*mu2));
volScalarField rho ("rho", (alpha1*rho1 + (scalar(1)-alpha1)*rho2));
surfaceScalarField rhoIntoPhi ("rhoIntoPhi", rho*phi);

it seems that at least one of the problems is that you're trying to assign a volScalarField (rho) to something that is a surfaceScalarField (rhoIntoPhi). You can make rho into a surfaceScalarField for example by:

Code:

surfaceScalarField muEff ("muEff", (alpha1*mu1 + (scalar(1)-alpha1)*mu2));
volScalarField rho ("rho", (alpha1*rho1 + (scalar(1)-alpha1)*rho2));
surfaceScalarField rhof = fvc::interpolate(rho);
surfaceScalarField rhoIntoPhi ("rhoIntoPhi", rhof*phi);

Hope that is of any help :)

EDIT: Whoops, missed Alberto's post. Well, hope it is helpful anyway :)

okroud June 19, 2012 08:50

Quote:

Originally Posted by Tanay (Post 315281)

Here's the fvSchemes file if anyone wishes to view it-
ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
grad(U) Gauss linear;
grad(muEff) Gauss linear;
grad(p_rgh) Gauss linear;
}

snGradSchemes
{
default corrected;
}

divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev(grad(U).T()))) Gauss linear;
div(phi,alpha1) Gauss limitedLinear 1;
div(phi) Gauss limitedLinear 1;
div(rhoPhi,U) Gauss limitedLinear 1;
div(rho*phi,U) Gauss limitedLinear 1;
}

It's long ago, but do you still know why you have set
div((nuEff*dev(grad(U).T()))) Gauss linear;
And not limitedLinear 1 like all the other divSchemes. I know Gauss limitedLinear 1 exactly doesn't work (which is actually my problem), but isn't there a similar Scheme like limitedLinearV1 oder limitedLinear phi that works for div((nuEff*dev(grad(U).T())))?

balkrishna June 19, 2012 09:01

According to the documentation , OpenFOAM doc
Code:

A limitedLinear scheme based on a flux phi with  is specified as default by phi = 1.
In ur definition, "div((nuEff*dev(grad(U).T()))) " there is no phi involved.

Probably , thats why Gauss limited linear doesnt work.

carlosfloar September 26, 2013 00:22

two liquid mixing in a pipe flow
 
Hi, I'm a master student who works about the mixing of two liquids in batching transport in a long pipes. I need to use a moving mesh because the high computational cost involved in the solutión of the entire domain. I want to use openFOAM for the solution of that problem specificaly employing the solver twoliquidmixingFoam. ¿It is possible to do?

thanks in advance for your help.

ziemowitzima September 26, 2013 11:44

What kind of flow, are u planning to model ? Turbulent one, what is your Re ?
Do you mean ADAPTIVE MESH or MOVING mesh (changing geometry of the domain).
Both are possible. Did you look in this forum ?

Best

carlosfloar September 26, 2013 19:00

I try to model a turbulent flow with Reynolds about 40000, I need to use moving mesh because the extension of the pipe, too many km and my interest is centered in the mixed fluid. At the moment I use a libraries written in c++ to attempt to solve this problem but I want to use OpenFOAM to solve it. ¿Anybody can help me with this? please, documentation, examples, tutorials...

m.Chrsitiano November 4, 2013 12:59

Hi everyone,

How do I know what equations that twoLiquidMixingFoam uses?
For exemple, if I set no turbulence model (laminar), where is the laplacian term in the UEqn? And where the solver uses the kinematic viscosity (nu)?

Any replay would be very helpful, since I've just started using OpenFOAM.

Best regards!

ziemowitzima November 4, 2013 13:14

Hi,
In the folder "system" in the file:
turbulenceProperties
you can set desired turbulence model. If you choose: laminar,
then standard N-S equations will be solved without any turbulence model, namely in the U eqn:
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
the diffusion term
turbulence->divDevReff(U)
will be "replaced" by :
laplacian(nu,U)
where nu is your viscosity

if you choose e.g.:
simulationType RASModel;
then you have to have one more file in "system":
RASproperties
then in
turbulence->divDevReff(U)
corresponding turbulence model will be solved

see some of the examples in the tutorial/run/.../cases

m.Chrsitiano November 4, 2013 13:46

Thank you very much! It was very enlightening!

Now make sense to me.
One more thing, about transport equation, where am I able to find it? Where is the file that it is writing?

Thank you very much again for your attention!

ziemowitzima November 4, 2013 14:53

every solver is located at:
/opt/openfoam210/applications/solvers

or sth similar depending what version of OF and what OS you have.

see
http://openfoamwiki.net/index.php/Main_Page
and
http://openfoamwiki.net/index.php/IcoFoam

best

m.Chrsitiano November 5, 2013 10:55

Thanks for the answer, that will be a nice help for me to work on.

carlosfloar January 14, 2014 17:43

schemes for alpha1
 
hi
I want to ask about the alphaDiffusionEqn.H file, in that file what's the meaning of the second line in:

fvm::ddt(alpha1)
- fvc::ddt(alpha1)
- fvm::laplacian
(
volScalarField("Dab", Dab + alphatab*turbulence->nut()),
alpha1
)
I think the meaning of the first line, fvm::ddt(alpha1) is (((rho_P*alpha1_P)^n)-((rho_P*alpha1_P)^o))/(Delta t)
it's this right? and, the second line?
please help me!!

carlosfloar January 22, 2014 14:39

twoLiquidMixingDyMFoam
 
hi, I'm working in the implementation of Dynamic mesh in twoLiquidMixingFoam solver, I'm stuck at the moment, I try to use InterDyMFoam for a guide but don't obtain any results....any suggestions?

carlosfloar January 23, 2014 21:20

twoLiquidMixingDyMFoam
 
I want to simulate a parcel composed of two fluids moving with the mean flow velocity, I try to implement DyM twoLiquidMixingFoam, but when I try to simulate a case the delta of time begins to decrease until it finally stops the solution ... I use a Courant=0.1 ,I initially tested on lockForExchange with boundary conditions fixedValue=0 on the walls ..... any suggestions?

m.Chrsitiano February 19, 2014 13:38

LES model
 
Hello everyone,

How can i implement the LES model in the solver twoLiquidMixingFoam?

Thank you very much!

m.Chrsitiano March 20, 2014 12:41

fvSchemes
 
Hey guys,

Nobody know how to setup the solver to LES?

Another thing is, how do i change the numerical schemes in the fvSchems file? For exemple, the InterpolationSchemes?

Please, i would be very greatful for any replay.

Thank you in advance,

Christiano.

carlosfloar June 25, 2014 13:26

twoLiquidMixingDyMFoam
 
Hi, I implemented the funcionality of dynamic mesh in the solver twoLiquidMixingFoam to solve the mixing of two fluids in a pipeline tracking a control volume of the domain large enough so that the interface between the two liquids is always contained therein. I ran tests with both sovers, twoLiquidMixingFoam and "twoLiquidMixingDyMFoam" but when comparing the amount of liquid that is mixed, it is rather more with the solver twoLiquidMixingDyMFoam. I use the same configuration in both solvers, the same fvSchemes, fvSolution, etc. anyone can help me with the Dynamic Mesh error?

m.Chrsitiano September 23, 2014 13:50

Front Velocity
 
Hello again people,

I was wondering...

How do you guys do to calculate the front velocity from a gravity current simulation?

himanshu28 December 8, 2014 06:35

Regarding Kinematic Viscosity
 
Hi ziemowitzima,

your reply was useful but since there are two fluids and in the transport property file we specify kinematic viscosity of both the fluid,hence my question is which fluid kinematic viscosity :confused::confused: will be used to solve the UEqn.

will be weighted same as density ----> rho = rho_1*alpha1 +rho_2*(1-alpha_1)
as there are nothing being mentioned on this part.

Thank you

Quote:

Originally Posted by ziemowitzima (Post 460512)
Hi,
In the folder "system" in the file:
turbulenceProperties
you can set desired turbulence model. If you choose: laminar,
then standard N-S equations will be solved without any turbulence model, namely in the U eqn:
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
the diffusion term
turbulence->divDevReff(U)
will be "replaced" by :
laplacian(nu,U)
where nu is your viscosity

if you choose e.g.:
simulationType RASModel;
then you have to have one more file in "system":
RASproperties
then in
turbulence->divDevReff(U)
corresponding turbulence model will be solved

see some of the examples in the tutorial/run/.../cases



All times are GMT -4. The time now is 20:14.