|
[Sponsors] |
December 4, 2022, 11:34 |
PyJac OF-10 Implementation
|
#1 |
New Member
Leon B
Join Date: Jan 2022
Posts: 1
Rep Power: 0 |
Hello all together,
Im trying to implement the PyJac into Openfoam 10, while using the CEMAFoam instructions (http://www.tfd.chalmers.se/~hani/kur...021_report.pdf, chapter 4), though they used OF-v2006 instead of OF-10. Therefore I've produced an error, which I dont know how to fix and I hope to recieve help from you Code:
Selecting chemistry solver { solver ode; method pyJacChemistryModel; } Using dynamicCode for codedBase ode_pyJacChemistryModel_sutherland_janaf_perfectGas_specie___sensibleEnthalpy___ at line 17 in "/opt/openfoam10/etc/codeTemplates/dynamicCode/basicChemistryModel" --> FOAM FATAL IO ERROR: Unknown method type pyJacChemistryModel Supported method types: 1 ( chemistryModel ) 1. copied the folder /opt/openfoam10/src/thermophysicalModels/chemistryModel 2. removed everything except the folder chemistryModel 3. mv chemistryModel pyJacChemistryModel 4. sed -i 's/chemistryModel/pyJacChemistryModel' * 5. changed TypeName("pyJacChemistryModel) in pyJacChemistryModel.H 6. make/files LIB = $(FOAM_USER_LIBBIN)/libpyJacChemistryModel and removed every path to the .c-files 7. make/options Lib_Libs = \ ... -lchemistryModel 8. set up a test case pyJac_tutorial_1C where I added into the controlDict libs ("libpyJacChemistryModel.so"); (9. I tried implementing "basicChemistryModelNew.C", since it seems to produce the error message, but when I entered a simple Debug "Info<<"..."<<endl; statement it never appears when running "reactingFoam" ) I didn't tried to implement the PyJac subroutines yet, since my goal is to do it step by step and right now it seems to be not even implementing my new library, since it is not finding pyJacChemistryModel. Therefore my question: Where do I need to enter my new model, so that it is accepted in the chemistryProperties dictionary? Or did I do something else wrong? Best regards Leon B. |
|
December 8, 2022, 17:58 |
|
#2 |
New Member
Join Date: Dec 2021
Location: Darmstadt
Posts: 6
Rep Power: 4 |
The Foundation and the ESI versions of OpenFOAM are not directly compatible in the chemistryModel anymore.
In general, pyJac is relatively straigt forward to use. You should only need to create a new chemistryModel which passes the mass fractions instead of molar concentrations to the dydt and jacobian functions of pyJac. If I were you, I would look at the DLBFoam repo which implemented dynamic load balancing for the chemistry and is also coupled to pyJac and uses OpenFOAM-8/9: https://github.com/Aalto-CFD/DLBFoam Might be easier to just use that or adapt from there. |
|
Tags |
chemistrymodel, dictionary, thermophysicalmodels |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Radiation Models in General and the P1 implementation | Tobi | OpenFOAM Running, Solving & CFD | 8 | September 21, 2021 06:59 |
Free CFD code with implementation of Menter's k-omega SST model | nikola_m | Main CFD Forum | 2 | May 8, 2020 13:13 |
Issues in FGM combustion model implementation | Lisandro Maders | OpenFOAM Programming & Development | 15 | April 22, 2020 20:18 |
Implementation issues of fvSchemes / laplacianScheme, in particular gaussLaplacianSch | thomek | OpenFOAM Programming & Development | 0 | October 18, 2010 06:10 |
Please explain the implementation of species transport Eqn in reactingFoam | kallipygian | OpenFOAM Running, Solving & CFD | 0 | October 13, 2008 08:29 |