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

accessing densities in compressibleInterFoam solver.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2022, 05:10
Default accessing densities in compressibleInterFoam solver.
  #1
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
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 )
now I got the following error
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
saicharan662000@gmail.com is offline   Reply With Quote

Reply

Tags
compressibleinterfoam, openfaom, openfoam8, solver


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing dictionaries from constant folder in multi region solver F42 OpenFOAM Programming & Development 5 January 19, 2022 06:56
How do I connect a geometry to my solver devansh.purohit Main CFD Forum 4 November 16, 2021 09:51
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Accessing the residuals from the solver juho OpenFOAM Running, Solving & CFD 3 July 1, 2008 08:49
Accessing a specific solver data Paul FLUENT 0 November 19, 2003 15:51


All times are GMT -4. The time now is 10:46.