CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

SRF and interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2009, 08:06
Default SRF and interFoam
  #1
Senior Member
 
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 110
Rep Power: 17
rcastilla is on a distinguished road
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 is offline   Reply With Quote

Old   July 10, 2009, 07:53
Default
  #2
Senior Member
 
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 110
Rep Power: 17
rcastilla is on a distinguished road
Quote:
Originally Posted by rcastilla View Post
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
rcastilla is offline   Reply With Quote

Old   August 20, 2013, 12:13
Question I'm trying to run VOF problem with SRF Foam as you did.
  #3
New Member
 
Po-Chang Chiang
Join Date: Jan 2010
Posts: 3
Rep Power: 16
jonah0830 is on a distinguished road
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.
jonah0830 is offline   Reply With Quote

Old   November 9, 2018, 10:56
Default SRFcompressible openfoam
  #4
New Member
 
Luis Fernando
Join Date: May 2013
Posts: 14
Rep Power: 13
ingarcia1703 is on a distinguished road
Hello community

I would like to ask you recommendations in order to solve a single reference frame compressible flow in OpenFOAM. I have been adding some lines to the original SRFModel available, and also create a new compressible solver "SRFrhoSImpleFoam". The issue is that I still receive the following message from units problem at the Coriolis and centrifugal force:
--> FOAM FATAL ERROR:
incompatible dimensions for operation
[U[1 -2 -2 0 0 0 0] ] + [(Fcoriolis+Fcentrifugal)[0 1 -2 0 0 0 0] ]

From function checkMethod(const fvMatrix<Type>&, const GeometricField<Type, fvPatchField, volMesh>&)
in file /opt/openfoam240/src/finiteVolume/lnInclude/fvMatrix.C at line 1319.

FOAM aborting


It is a problem concerning the density. I have to multiply the centrifugal and Coriolis force by the density "rho" in order to get the same magnitude. Nevertheless, the files seem not to be taken into account this product:

Foam::tmp<Foam:imensionedField<Foam::vector, Foam::volMesh> >
Foam::SRF::SRFModel::Fcoriolis() const
{
return tmp<DimensionedField<vector, volMesh> >
(
new DimensionedField<vector, volMesh>
(
IOobject
(
"Fcoriolis",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
rho*2.0*omega_ ^ Urel_
)
);
}


Foam::tmp<Foam:imensionedField<Foam::vector, Foam::volMesh> >
Foam::SRF::SRFModel::Fcentrifugal() const
{
return tmp<DimensionedField<vector, volMesh> >
(
new DimensionedField<vector, volMesh>
(
IOobject
(
"Fcentrifugal",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
rho*omega_ ^ (omega_ ^ (mesh_.C() - origin_))
)
);
}
At following you can see what I have made ar the SRFModel.H and SRFModel.C

I already added some lines to SRFMOdel.C to consider this new value rho:
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

Foam::SRF::SRFModel::SRFModel
(
const word& type,
const volVectorField& Urel
const volScalarField& rho
)

And the SRFModel.H:

Public:

const volScalarField& rho;


BUt still appears the issue concerning the units, it is not taken into account the "rho" value.

I appreciate your feedback
ingarcia1703 is offline   Reply With Quote

Reply

Tags
interfoam, srf


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 16:13.