|
[Sponsors] |
How to convert psiChemistryModel for multi Zone? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 21, 2012, 03:17 |
How to convert psiChemistryModel for multi Zone?
|
#1 |
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 15 |
Hello,
I am currently working on a code to use chemistry in different zones. I started with chtMultiRegionFoam solver as basis source code. I basically try to realize chemFoam behavior for all fluid zones (solid zones are removed completely). So far, I managed to read initial conditions, chemKin input files and chemistry properties for each region. The next step is to create an instance of psiChemistryModel for each region. In chemFoam (or rhoReactionFoam) this is done doing the following: http://foam.sourceforge.net/docs/cpp/a03249_source.html Code:
00026 Info<< nl << "Reading thermophysicalProperties" << endl; 00027 autoPtr<psiChemistryModel> pChemistry(psiChemistryModel::New(mesh)); Code:
autoPtr<psiChemistryModel> pChemistry(psiChemistryModel::New(fluidRegions[i])); Code:
Reading initial conditions. Adding to YdefaultFluid Selecting psiChemistryModel ODEChemistryModel<gasThermoPhysics> Selecting thermodynamics package hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>> Selecting chemistryReader chemkinReader #0 Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/libc.so.6" #3 Foam::fvPatchField<double>::operator/=(Foam::fvPatchField<double> const&) in "/home/florian/OpenFOAM/florian-2.0.x/platforms/linux64GccDPOpt/bin/multiRegionChemFoam" #4 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::operator/=(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so" #5 Foam::multiComponentMixture<Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > >::correctMassFractions() in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so" #6 Foam::multiComponentMixture<Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > >::multiComponentMixture(Foam::dictionary const&, Foam::List<Foam::word> const&, Foam::HashPtrTable<Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > >, Foam::word, Foam::string::hash> const&, Foam::fvMesh const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so" #7 Foam::reactingMixture<Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > >::reactingMixture(Foam::dictionary const&, Foam::fvMesh const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so" #8 Foam::hsPsiMixtureThermo<Foam::reactingMixture<Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > > >::hsPsiMixtureThermo(Foam::fvMesh const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so" #9 Foam::hsCombustionThermo::addfvMeshConstructorToTable<Foam::hsPsiMixtureThermo<Foam::reactingMixture<Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > > > >::New(Foam::fvMesh const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so" #10 Foam::hsCombustionThermo::NewType(Foam::fvMesh const&, Foam::word const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so" #11 Foam::psiChemistryModel::psiChemistryModel(Foam::fvMesh const&, Foam::word const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so" #12 Foam::ODEChemistryModel<Foam::psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > >::ODEChemistryModel(Foam::fvMesh const&, Foam::word const&, Foam::word const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so" #13 Foam::ode<Foam::ODEChemistryModel<Foam::psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > > >::ode(Foam::fvMesh const&, Foam::word const&, Foam::word const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so" #14 Foam::psiChemistryModel::addfvMeshConstructorToTable<Foam::ode<Foam::ODEChemistryModel<Foam::psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > > > >::New(Foam::fvMesh const&, Foam::word const&, Foam::word const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so" #15 Foam::psiChemistryModel::New(Foam::fvMesh const&) in "/opt/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so" #16 in "/home/florian/OpenFOAM/florian-2.0.x/platforms/linux64GccDPOpt/bin/multiRegionChemFoam" #17 __libc_start_main in "/lib/libc.so.6" #18 in "/home/florian/OpenFOAM/florian-2.0.x/platforms/linux64GccDPOpt/bin/multiRegionChemFoam" 浮動小数点例外 In chtMultiRegionFoam there is an analog line where the current region mesh is plugged into a constructor of similar type (it only takes a const mesh as input): http://foam.sourceforge.net/docs/cpp/a02601_source.html Code:
00029 thermoFluid.set 00030 ( 00031 i, 00032 basicRhoThermo::New(fluidRegions[i]).ptr() 00033 ); So I wonder if anybody has an idea why I cannot do this in the same manner for the psiChemistryModel constructor. Any hints or comments are highly appreciated. |
|
November 21, 2012, 05:16 |
Reason found
|
#2 |
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 15 |
Looks like I found the reason for my floating point error
First of all, the constructor for psiChemistryModel can be used for zonal calculations in the same way as for example basicRhoThermo. What actually caused the problems were zero boundary values. On the interface boundary between my regions, I had zero values for the species in the field Ydefault. So setting this to zeroGradient or any nonzeroValue solved the problem. I realised that for a boundary I cannot define all species to be zero. Looking at line 5 of my previously posted error message Code:
#5 Foam::multiComponentMixture<Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > >::correctMassFractions() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 11:52 |
[ICEM] Export ICEM mesh to Gambit / Fluent | romekr | ANSYS Meshing & Geometry | 1 | November 26, 2011 13:11 |
Problem in running ICEM grid in Openfoam | Tarak | OpenFOAM | 6 | September 9, 2011 18:51 |
Problem in IMPORT of ICEM input file in FLUENT | csvirume | FLUENT | 2 | September 9, 2009 02:08 |
Sliding mesh error | Karl Kevala | FLUENT | 4 | February 21, 2001 16:52 |