|
[Sponsors] |
July 7, 2009, 08:06 |
SRF and interFoam
|
#1 |
Senior Member
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 110
Rep Power: 17 |
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 |
|
July 10, 2009, 07:53 |
|
#2 | |
Senior Member
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 110
Rep Power: 17 |
Quote:
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 |
||
August 20, 2013, 12:13 |
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 |
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. |
|
November 9, 2018, 10:56 |
SRFcompressible openfoam
|
#4 |
New Member
Luis Fernando
Join Date: May 2013
Posts: 14
Rep Power: 13 |
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 |
|
Tags |
interfoam, srf |
|
|