CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

PyJac OF-10 Implementation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2022, 10:34
Question PyJac OF-10 Implementation
  #1
New Member
 
Leon B
Join Date: Jan 2022
Posts: 1
Rep Power: 0
Leber006 is on a distinguished road
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
)
What did I do so far:
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.
Leber006 is offline   Reply With Quote

Old   December 8, 2022, 16:58
Default
  #2
New Member
 
Join Date: Dec 2021
Location: Darmstadt
Posts: 6
Rep Power: 4
dkaddar is on a distinguished road
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.
dkaddar is offline   Reply With Quote

Reply

Tags
chemistrymodel, dictionary, thermophysicalmodels


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
Radiation Models in General and the P1 implementation Tobi OpenFOAM Running, Solving & CFD 8 September 21, 2021 05:59
Free CFD code with implementation of Menter's k-omega SST model nikola_m Main CFD Forum 2 May 8, 2020 12:13
Issues in FGM combustion model implementation Lisandro Maders OpenFOAM Programming & Development 15 April 22, 2020 19:18
Implementation issues of fvSchemes / laplacianScheme, in particular gaussLaplacianSch thomek OpenFOAM Programming & Development 0 October 18, 2010 05:10
Please explain the implementation of species transport Eqn in reactingFoam kallipygian OpenFOAM Running, Solving & CFD 0 October 13, 2008 07:29


All times are GMT -4. The time now is 06:08.