|
[Sponsors] |
Adding thermophysical model to chemistryType runtime table |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 4, 2014, 22:00 |
Adding thermophysical model to chemistryType runtime table
|
#1 |
Member
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 13 |
I'm attempting to add a thermophysical model (myGasThermoPhysics) to the chemistry model runtime selection table so I can use my own Cp and viscosity in my reacting simulations. I've managed to get it added to the selection table as evidenced by:
Code:
ode psi hollis myJanaf perfectGas specie sensibleEnthalpy Code:
Selecting combustion model PaSR<psiChemistryCombustion> Selecting chemistry type { chemistrySolver ode; chemistryThermo psi; } Selecting thermodynamics package { type hePsiThermo; mixture massAveragedMixture; transport hollis; thermo myJanaf; energy sensibleEnthalpy; equationOfState perfectGas; specie specie; } terminate called after throwing an instance of 'std::bad_cast' what(): std::bad_cast Aborted (core dumped) In my custom library where the custom Cp, viscosity and mixtures are defined I created 3 files with the following code sections: Code:
#include "makeChemistrySolverTypes.H" #include "speciesPhysicsTypes.H" //#include "thermoPhysicsTypes.H" #include "psiChemistryModel.H" #include "rhoChemistryModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Chemistry solvers based on sensibleEnthalpy makeChemistrySolverTypes(psiChemistryModel, myGasThermoPhysics); } Code:
#ifndef reactionTypes_H #define reactionTypes_H //#include "thermoPhysicsTypes.H" #include "Reaction.H" #include "speciesPhysicsTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { typedef Reaction<myGasThermoPhysics> myGasReaction; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif Code:
#include "makeChemistryModel.H" #include "speciesPhysicsTypes.H" #include "psiChemistryModel.H" #include "chemistryModel.H" //#include "thermoPhysicsTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Chemistry moldels based on sensibleEnthalpy makeChemistryModel ( chemistryModel, psiChemistryModel, myGasThermoPhysics ); } I then of course added them as make targets in the Make/files file and added the proper lnInclude folders in the Make/options file. As far as I can tell from the source this is all I need to do to add a thermophysical model to the runtime selection for the chemistry, but I seem to be missing something given the error. Can anyone shed some light on this? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding a Turbulence Model | doug | OpenFOAM Running, Solving & CFD | 11 | May 21, 2018 13:54 |
Problem in3D model processing | mebinitap | OpenFOAM | 2 | December 12, 2014 04:40 |
Adding a turbulence model into my own CFD code | quarkz | Main CFD Forum | 3 | November 23, 2013 22:53 |
DPM model w/ Wave model - errors in documentation | HS | FLUENT | 0 | April 12, 2006 04:37 |
Advanced Turbulence Modeling in Fluent, Realizable k-epsilon Model | Jonas Larsson | FLUENT | 5 | March 13, 2000 03:27 |