|
[Sponsors] |
May 20, 2021, 08:18 |
Adding New thermophysicalModel to OpenFOAM
|
#1 |
New Member
Join Date: May 2021
Posts: 2
Rep Power: 0 |
Hi guys,
I am in dire need of help. Please help me with this. I am tyring to add a new transport model in thermophysicalModel which takes input as a csv file and converts it to interpolation table(mu vs T). I am using chtMultiRegionFoam. I made my own Model in specie/transport with all kinds of operator overloading functions. I did linking properly of new "mySpecie" and "myBasic". I defined the thermophysicsType (typedef <>) for my new model, I defined new rhoThermo type. After compiling, when I use new thermophysical model, it throws an error and the list of thermo-types it shows doesn't even show my model. when I implemented same in rhoReaction and repeat all previous steps, It shows in the list of thermophysical models which the OpenFOAM throws. Any Idea about where I'll be missing? |
|
May 20, 2021, 13:00 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14 |
If your new model is not listed as an option, then your model changes have clearly not loaded. Perhaps you missed a reference to your new library in controlDict? Just check carefully, and methodically through each step that you have taken and maybe you will find the error.
To be honest, you have provided so little information about what you have done that it is impossible to help you ... |
|
May 21, 2021, 02:16 |
|
#3 | |
New Member
Join Date: May 2021
Posts: 2
Rep Power: 0 |
Quote:
Sorry! I have pasted here some snippet. Please see if you can find issue. Thanks! Here is the snippet of myThermophysicalModels/mySpecie/include/thermophysicsType.H : Code:
#include "pcmTransport.H" typedef pcmTransport < species::thermo < hConstThermo < perfectGas<specie> >, sensibleEnthalpy > > PCMTransport; Code:
atomicWeights/atomicWeights.C mySpecie/specie.C reaction/reactions/makeReactions.C reaction/reactions/makeLangmuirHinshelwoodReactions.C reaction/reactions/makeMichaelisMentenReactions.C LIB = $(FOAM_USER_LIBBIN)/libspecie Code:
EXE_INC = \ -I$(WM_PROJECT_USER_DIR)/src/my_lib/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = -lOpenFOAM \ -L$(FOAM_USER_LIBBIN) \ -lcsvReader \ -lfiniteVolume \ -lmeshTools Code:
#include "pcmTransport.H" // rest of necessary files are already included makeThermos ( rhoThermo, heRhoThermo, pureMixture, pcmTransport, sensibleEnthalpy, hConstThermo, perfectGas, specie ); Code:
myBasicThermo/myBasicThermo.C fluidThermo/fluidThermo.C psiThermo/psiThermo.C psiThermo/psiThermos.C rhoThermo/rhoThermo.C rhoThermo/rhoThermos.C rhoThermo/liquidThermo.C derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C LIB = $(FOAM_USER_LIBBIN)/libfluidThermophysicalModels here is the snippet of myBasic/Make/option: Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/my_lib/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/mySpecie/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/thermophysicalProperties/lnInclude LIB_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lcsvReader \ -lspecie \ -lcompressibleTransportModels \ -lfiniteVolume \ -lmeshTools and finally, here is the snippet of chtMultiRegionFoam's Make/option: Code:
EXE_INC = \ -I. \ -I./fluid \ -I./solid \ -I./porousFluid \ -I./porousSolid \ -I./include \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(WM_PROJECT_USER_DIR)/src/my_lib/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/myBasic/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/mySpecie/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/myReactionThermo/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/mySolidThermo/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/myChemistryModel/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/myTurbulenceModels/turbulenceModels/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/myTurbulenceModels/compressible/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/myRadiation/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lcsvReader \ -lcompressibleTransportModels \ -lfluidThermophysicalModels \ -lspecie \ -lreactionThermophysicalModels \ -lsolidThermo \ -lchemistryModel \ -lODE \ -lcombustionModels \ -lturbulenceModels \ -lcompressibleTurbulenceModels \ -lmeshTools \ -lfiniteVolume \ -lradiationModels \ -lfvOptions \ -lregionModels \ -lsampling |
||
Tags |
openfoam, openfoam programming, thermophysical model, transportmodels |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
multiRegionHeater error | ordinary | OpenFOAM Running, Solving & CFD | 2 | June 9, 2020 18:43 |
OpenFOAM Training Beijing 22-26 Aug 2016 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | May 3, 2016 05:57 |
chtMultiRegionSimpleFoam | samiam1000 | OpenFOAM Running, Solving & CFD | 39 | March 31, 2016 09:43 |
Adding Radiation Sub-models into OpenFOAM 1.5 | shajitah | OpenFOAM | 0 | September 13, 2010 22:26 |