|
[Sponsors] |
January 23, 2022, 09:01 |
Accessing species in coded function object
|
#1 |
Member
Join Date: Jun 2020
Posts: 49
Rep Power: 5 |
Hi everyone,
I am currently writing a coded function object for the reactingFoam solver. For the application I need to access the species. In the solver code this can be done by Code:
forAll(Y, i){ doWhatever(); } Thank you very much in advance! |
|
January 23, 2022, 13:08 |
Additional problem
|
#2 |
Member
Join Date: Jun 2020
Posts: 49
Rep Power: 5 |
There appeared another problem when creating an IOdictionary. For the Following code
Code:
IOdictionary reactions ( IOobject( "reactions", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); |
|
January 24, 2022, 04:52 |
|
#3 |
Senior Member
|
Not sure.
Possibly looking into codedFunctionObject documented here https://www.openfoam.com/documentati...ionObject.html Inside the codedFunctionObject you should be able to use forAll as intended. Likely you will need to distinguish between fuel, oxidizer, product and inert species. This information is stored in the thermo.composition object |
|
Tags |
coded functions, species |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 07:15 |
[mesh manipulation] refineMesh Error | mohsen.boojari | OpenFOAM Meshing & Mesh Conversion | 3 | March 1, 2018 22:07 |
[snappyHexMesh] Problem with parallel run of snappyHexMesh | Lorenzo92 | OpenFOAM Meshing & Mesh Conversion | 5 | April 15, 2016 04:12 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 07:36 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 06:51 |