|
[Sponsors] |
accessing densities in compressibleInterFoam solver. |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 4 ![]() |
Hello guys,
I am trying to develop my own solver. I am using openfoam version 8. I am wrote a code in twoPhaseMixtureThermo.C for calculating heat transfer coefficient. Code:
1.079 * (lambdaF_ / charLength_ ) * pow( (pow3(charLength_) * ifg_ * g_ * (thermo1_->rho() - thermo2_->rho()) )/ (lambdaF_ * mu_ * (Tsat_ - Tinf_) ) , 0.2 ) I found the issue of my code. (thermo1_->rho() - thermo2_->rho()) is causing error when I run test case(i.e damBreak problem). Code:
object of type N4Foam9rhoThermoE is not allocated So to remove that i declared a variable rhoE in twoPhaseMixtureThermo.H like this. tmp<volScalarField> rhoE = thermo1_->rho() - thermo2_->rho(); and used rhoE in above formula in twoPhaseMixtureThermo.C Code:
1.079 * (lambdaF_ / charLength_ ) * pow( (pow3(charLength_) * ifg_ * g_ * (rhoE) )/ (lambdaF_ * mu_ * (Tsat_ - Tinf_) ) , 0.2 ) Code:
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 calculating hcoeff #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::operator*(Foam::dimensionSet const&, Foam::dimensionSet const&) at ??:? #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/hari/OpenFOAM/hari-8/platforms/linux64GccDPInt32Opt/bin/myCompressibleInterFoam_4" #5 Foam::twoPhaseMixtureThermo::hCoeff() const at ??:? #6 Foam::twoPhaseMixtureThermo::mDotAlphal() const at ??:? #7 Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:? #8 ? in "/home/hari/OpenFOAM/hari-8/platforms/linux64GccDPInt32Opt/bin/myCompressibleInterFoam_4" #9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #10 ? in "/home/hari/OpenFOAM/hari-8/platforms/linux64GccDPInt32Opt/bin/myCompressibleInterFoam_4" Segmentation fault (core dumped) Can anyone help me with this? Thanks in advance ![]() |
|
![]() |
![]() |
![]() |
Tags |
compressibleinterfoam, openfaom, openfoam8, solver |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing dictionaries from constant folder in multi region solver | F42 | OpenFOAM Programming & Development | 5 | January 19, 2022 05:56 |
How do I connect a geometry to my solver | devansh.purohit | Main CFD Forum | 4 | November 16, 2021 08:51 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 20:02 |
Accessing the residuals from the solver | juho | OpenFOAM Running, Solving & CFD | 3 | July 1, 2008 07:49 |
Accessing a specific solver data | Paul | FLUENT | 0 | November 19, 2003 14:51 |