CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[Other] real gas model implementation for thermophysicalModels library

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2024, 03:21
Default For OpenFOAM-8 version!
  #41
New Member
 
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6
danhnam is on a distinguished road
Hi everyone!

I switched real-fluid models into the OpenFOAM-8 version. You can freely download it here: https://github.com/danhnam11/realFlu...ysicalModels-8

Enjoy!
Lubing Xu likes this.
danhnam is offline   Reply With Quote

Old   November 12, 2024, 03:23
Default
  #42
New Member
 
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6
danhnam is on a distinguished road
Quote:
Originally Posted by Congren_Zheng View Post
Hi, the library is very nice. I got a problem during Allwmake.
The error code is like this:
In file included from specie/specie.H:155:0,
from specie/specie.C:26:
specie/specieI.H: In member function ‘void Foam::specie:perator+=(const Foam::specie&)’:
specie/specieI.H:108:21: error: ‘small’ was not declared in this scope
if (mag(sumY) > small)
^~~~~
specie/specieI.H:108:21: note: suggested alternative: ‘scalbl’
if (mag(sumY) > small)
^~~~~
scalbl
specie/specieI.H: In function ‘Foam::specie Foam:perator+(const Foam::specie&, const Foam::specie&)’:
specie/specieI.H:127:46: error: ‘small’ was not declared in this scope
const scalar sumY = max(st1.Y_ + st2.Y_, small);
^~~~~
specie/specieI.H:127:46: note: suggested alternative: ‘scalbl’
const scalar sumY = max(st1.Y_ + st2.Y_, small);
^~~~~
scalbl
specie/specieI.H: In function ‘Foam::specie Foam:perator==(const Foam::specie&, const Foam::specie&)’:
specie/specieI.H:157:22: error: ‘small’ was not declared in this scope
if (mag(diffY) < small)
^~~~~
specie/specieI.H:157:22: note: suggested alternative: ‘scalbl’
if (mag(diffY) < small)
^~~~~
scalbl
specie/specieI.H:165:24: error: ‘great’ was not declared in this scope
scalar molWeight = great;
^~~~~
specie/specieI.H:165:24: note: suggested alternative: ‘read’
scalar molWeight = great;
^~~~~
read
specie/specieI.H:166:23: error: ‘small’ was not declared in this scope
if (mag(diffRW) > small)
^~~~~
specie/specieI.H:166:23: note: suggested alternative: ‘scalbl’
if (mag(diffRW) > small)
^~~~~
scalbl
/usr/lib/openfoam/openfoam2306/wmake/rules/General/transform:37: recipe for target 'Make/linux64GccDPInt32Opt/specie/specie.o' failed
make: *** [Make/linux64GccDPInt32Opt/specie/specie.o] Error 1

The problem is that there is no definition of variable 'small'
Sorry for the late reply. The developed real-fluid library is only compatible with OpenFOAM-6 version. It is not compatible with of2306.

Danh Nam
danhnam is offline   Reply With Quote

Old   November 12, 2024, 03:28
Default
  #43
New Member
 
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6
danhnam is on a distinguished road
Quote:
Originally Posted by Li Xuejiao View Post
When I wanted to replace methane with hydrogen in the case tutorials/laminarCounterFlowFlame-2D/GRI30/, I used H2_Li from inputThermoData_OF_format, but I encountered the following error. Does anyone know the reason for this? I would greatly appreciate your help.
Selecting chemistryReader foamChemistryReader
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam:imensionedField<double, Foam::volMesh>:perator/=(Foam:imensionedField<double, Foam::volMesh> const&) at ??:?
#4 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>:perator/=(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#5 Foam::SRKchungKineticMixture<Foam::chungKineticTra nsport<Foam::species::thermo<Foam::rfJanafThermo<F oam::soaveRedlichKwongFoam::rfSpecie >, Foam::sensibleEnthalpy> > >::correctMassFractions() at ??:?
#6 Foam::SRKchungKineticMixture<Foam::chungKineticTra nsport<Foam::species::thermo<Foam::rfJanafThermo<F oam::soaveRedlichKwongFoam::rfSpecie >, Foam::sensibleEnthalpy> > >::SRKchungKineticMixture(Foam::dictionary const&, Foam::ListFoam::word const&, Foam::HashPtrTable<Foam::chungKineticTransport<Foa m::species::thermo<Foam::rfJanafThermo<Foam::soave RedlichKwongFoam::rfSpecie >, Foam::sensibleEnthalpy> >, Foam::word, Foam::string::hash> const&, Foam::fvMesh const&, Foam::word const&) at ??:?
#7 Foam::SRKchungKineticReactingMixture<Foam::chungKi neticTransport<Foam::species::thermo<Foam::rfJanaf Thermo<Foam::soaveRedlichKwongFoam::rfSpecie >, Foam::sensibleEnthalpy> > >::SRKchungKineticReactingMixture(Foam::dictiona ry const&, Foam::fvMesh const&, Foam::word const&) at ??:?
#8 Foam::heThermo<Foam:siReactionThermo, Foam::SpecieMixture<Foam::SRKchungKineticReactingM ixture<Foam::chungKineticTransport<Foam::species:: thermo<Foam::rfJanafThermo<Foam::soaveRedlichKwong Foam::rfSpecie >, Foam::sensibleEnthalpy> > > > >::heThermo(Foam::fvMesh const&, Foam::word const&) at ??:?
#9 Foam::hePsiThermo<Foam:siReactionThermo, Foam::SpecieMixture<Foam::SRKchungKineticReactingM ixture<Foam::chungKineticTransport<Foam::species:: thermo<Foam::rfJanafThermo<Foam::soaveRedlichKwong Foam::rfSpecie >, Foam::sensibleEnthalpy> > > > >::hePsiThermo(Foam::fvMesh const&, Foam::word const&) at ??:?
#10 Foam:siReactionThermo::addfvMeshConstructorToTab le<Foam::hePsiThermo<Foam:siReactionThermo, Foam::SpecieMixture<Foam::SRKchungKineticReactingM ixture<Foam::chungKineticTransport<Foam::species:: thermo<Foam::rfJanafThermo<Foam::soaveRedlichKwong Foam::rfSpecie >, Foam::sensibleEnthalpy> > > > > >::New(Foam::fvMesh const&, Foam::word const&) at ??:?
Floating point exception (core dumped)
Could you give the details of your test case? It would be better if you could describe the setup of your test case more clearly.

Danh Nam
danhnam is offline   Reply With Quote

Old   November 12, 2024, 03:30
Default
  #44
New Member
 
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6
danhnam is on a distinguished road
Quote:
Originally Posted by wellzt View Post
Hi guys,

Did somebody ever tried BC "externalWallHeatFluxTemperature"?
I encounter some problems with this, when I use BC like
{
type externalWallHeatFluxTemperature;
mode flux;
q uniform 118000;

kappaMethod lookup;
kappa kappa;

value $internalField;
}
Solver will crush at EEqn.solve():
{
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::rfJanafThermo<Foam::PengRobinson<Foam::rfSpe cie> >::Ha(double, double) const at ??:?
#4 Foam::heThermo<Foam::rhoReactionThermo, Foam::SpecieMixture<Foam::PRchungTakaReactingMixtu re<Foam::chungTakaTransport<Foam::species::thermo< Foam::rfJanafThermo<Foam::PengRobinson<Foam::rfSpe cie> >, Foam::sensibleEnthalpy> > > > >::he(Foam::Field<double> const&, Foam::Field<double> const&, int) const at ??:?
#5 Foam::mixedEnergyFvPatchScalarField::updateCoeffs( ) at ??:?
#6 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricFi eld<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in "/home/wellzt/OpenFOAM/wellzt-6/platforms/linux64GccDPInt32Opt/bin/realFluidRhoReactingBuoyantFoam"
#7 Foam::tmp<Foam::fvMatrix<double> > Foam::fv:ptionList:perator()<double>(Foam::Geo metricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::word const&) in "/home/wellzt/OpenFOAM/wellzt-6/platforms/linux64GccDPInt32Opt/bin/realFluidRhoReactingBuoyantFoam"
#8 ? in "/home/wellzt/OpenFOAM/wellzt-6/platforms/linux64GccDPInt32Opt/bin/realFluidRhoReactingBuoyantFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 ? in "/home/wellzt/OpenFOAM/wellzt-6/platforms/linux64GccDPInt32Opt/bin/realFluidRhoReactingBuoyantFoam"
Floating point exception
}
Why should it happend? externalWallHeatFluxTemperatureFvPatchScalarField. C located at src\TurbulenceModels\compressible\turbulentFluidTh ermoModels\derivedFvPatchFields\externalWallHeatFl uxTemperature. As I see, the turbulentFluidThermoModels were recompiled in realFluidThermophysicalModels-6

best,
jeff
Hi Jeff!

Did you solve the problem?

Danh Nam.
danhnam is offline   Reply With Quote

Old   Yesterday, 00:04
Default
  #45
New Member
 
Join Date: Feb 2024
Posts: 6
Rep Power: 2
Lubing Xu is on a distinguished road
Quote:
Originally Posted by danhnam View Post
Hi everyone!

I switched real-fluid models into the OpenFOAM-8 version. You can freely download it here: https://github.com/danhnam11/realFlu...ysicalModels-8

Enjoy!
Is this model suitable for polar gas, for example ammonia?
Lubing Xu is offline   Reply With Quote

Reply


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
Compile User-Defined Real Gas Model (UDRGM) Captain Convergence Fluent UDF and Scheme Programming 31 November 6, 2020 07:30
make a new data from external .txt data and save it in a UDM etedalgara Fluent UDF and Scheme Programming 27 February 26, 2020 04:15
UDF velocity profile willroca Fluent UDF and Scheme Programming 2 January 10, 2016 04:13
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
view factor yoollooz Fluent UDF and Scheme Programming 0 March 1, 2013 01:44


All times are GMT -4. The time now is 11:43.