|
[Sponsors] | |||||
How to acess the cell volumes and use them in the equations? |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Member
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 6 ![]() |
Hello everyone,
I am new to openfoam. I am calculating interface area . I wore a subroutine in twoPhaseMixtureThermo.C in compressibleInterFoam solver. I used the following subroutine in twoPhaseMixtureThermo.C to use cell volume . Code:
const volScalarField& cellVolume =
alpha1().db().lookupObject<volScalarField>("cellVolu");
Code:
volScalarField cellVolume
(
IOobject
(
"cellVolume",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimVolume, 0.0)
);
cellVolume.ref() = mesh.V();
Create time Create mesh for time = 0 PIMPLE: No convergence criteria found PIMPLE: Operating solver in transient mode with 1 outer corrector PIMPLE: Operating solver in PISO mode Reading field p_rgh Reading field U Reading/calculating face flux field phi Constructing twoPhaseMixtureThermo Reading field interfaceArea --> FOAM FATAL ERROR: request for volScalarField cellVolu from objectRegistry region0 failed available objects of type volScalarField are 9 ( thermo:mu interfaceProperties:K thermo sialpha.water p_rgh p T alpha.air thermo:alpha ) From function const Type& Foam: bjectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]in file /opt/openfoam8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211. FOAM aborting #0 Foam::error: rintStack(Foam::Ostream&) at ??:?#1 Foam::error::abort() at ??:? #2 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam: bjectRegistry::lookupObject<Foam::Geometric Field<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/home/hari/OpenFOAM/hari-8/platforms/linux64GccDPInt32Opt/bin/myCompressibleInterFoam_1"#3 Foam::twoPhaseMixtureThermo::interfaceArea() const at ??:? #4 Foam::twoPhaseMixtureThermo::mDotAlphal() const at ??:? #5 Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo (Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:? #6 ? in "/home/hari/OpenFOAM/hari-8/platforms/linux64GccDPInt32Opt/bin/myCompressibleInterFoam_1" #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #8 ? in "/home/hari/OpenFOAM/hari-8/platforms/linux64GccDPInt32Opt/bin/myCompressibleInterFoam_1" Aborted (core dumped) Can anyone help me with this? Thanks in advance |
|
|
|
|
|
![]() |
| Tags |
| compressible multiphase, compressibleinterfoam, openfoam, openfoam 8 |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|