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/)
-   -   SRF and interFoam (http://www.cfd-online.com/Forums/openfoam-solving/66149-srf-interfoam.html)

rcastilla July 7, 2009 07:06

SRF and interFoam
 
Hello,

I am trying to run a case with SRF with an interphase. For the moment, this UEqn.H is working for me:

surfaceScalarField muf = twoPhaseProperties.muf();

fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muf, U)
- (fvc::grad(U) & fvc::grad(muf))
+ rho*(SRF->Su())
//- fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
);

if (momentumPredictor)
{
solve
(
UEqn
==
fvc::reconstruct
(
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(g amma)
- ghf*fvc::snGrad(rho)
- fvc::snGrad(pd)
) * mesh.magSf()
)
);
}

but I wonder if the Su() term should be included in ghf. I tried then this definition in createFields.H:

Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", ((g & mesh.C()) + (SRF->Su() & mesh_.C()));
surfaceScalarField ghf("gh", ((g & mesh.Cf())+ (SRF->Su() & mesh_.Cf()));

but it doesn't work because mesh_ is a private member of SRF. Of course with mesh it doesn't work as well. I am not an expert in either OpenFoam or C++. Maybe someone can give me some help.

Thanks in advance

Robert Castilla

rcastilla July 10, 2009 06:53

Quote:

Originally Posted by rcastilla (Post 221754)
Hello,

I am trying to run a case with SRF with an interphase. For the moment, this UEqn.H is working for me:

surfaceScalarField muf = twoPhaseProperties.muf();

fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muf, U)
- (fvc::grad(U) & fvc::grad(muf))
+ rho*(SRF->Su())
//- fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
);

if (momentumPredictor)
{
solve
(
UEqn
==
fvc::reconstruct
(
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(g amma)
- ghf*fvc::snGrad(rho)
- fvc::snGrad(pd)
) * mesh.magSf()
)
);
}

but I wonder if the Su() term should be included in ghf. I tried then this definition in createFields.H:

Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", ((g & mesh.C()) + (SRF->Su() & mesh_.C()));
surfaceScalarField ghf("gh", ((g & mesh.Cf())+ (SRF->Su() & mesh_.Cf()));

but it doesn't work because mesh_ is a private member of SRF. Of course with mesh it doesn't work as well. I am not an expert in either OpenFoam or C++. Maybe someone can give me some help.

Thanks in advance

Robert Castilla

Finaly, I realised that the UEqn is not solved, and it is used for the PISO loop. I have included the centrifugal force in the gh and ghf in this way:

Info<< "Calculating field g.h\n" << endl;
dimensionedVector omega(SRF->omega());
volScalarField gh("gh", (g + (omega ^ (omega ^ mesh.C()))) & mesh.C());
surfaceScalarField ghf("gh", (g + (omega ^ (omega ^ mesh.Cf()))) & mesh.Cf());

and, at list, it compiles without error. I deleted also the Su() term in the UEqn, and now I have to test it. But I have problems for the definition of p and pd BC.If the are not external forces aside of gravity and centrifugal, has to be pd 0?

Robert

jonah0830 August 20, 2013 11:13

I'm trying to run VOF problem with SRF Foam as you did.
 
Dear Robert
I chance to find your post of long time ago. I'm also trying to run VOF problem with SRF solvers of openFoam. My plan is to modify the origional SRFPimpleFoam and involve some interphase relevant functions in it. Do you suggest it and any other good ideas? I'm also thinking about finding a verification case for the new solver. Which one do you recommend? Hope to hear some suggession from you. Thanks in advance.


All times are GMT -4. The time now is 07:55.