|
[Sponsors] |
October 24, 2011, 05:56 |
how to output hi in OpenFoam
|
#1 |
New Member
yi Wang
Join Date: Feb 2011
Posts: 15
Rep Power: 15 |
hello,everyone
In Openfoam, How to output speices specific enthalpy hi? Any comments, please |
|
October 24, 2011, 13:12 |
|
#2 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Read this section of the manual on run time code compilation:
http://www.openfoam.com/version2.0.0...me-control.php In the source code for a particular solver you specify which fields to write out when they are created, usually createFields.C. If you want the specific enthalpy of each species, you need to execute code at run-time that will write out the h field for every field i. Most likely you need to create a reference to each field with its own name (in a forAll loop) and then execute an hi.write(). You'll have to specify an interval at which these fields will be written. |
|
October 27, 2011, 05:31 |
|
#3 | |
New Member
yi Wang
Join Date: Feb 2011
Posts: 15
Rep Power: 15 |
Quote:
Thank you very much! would you like to show me an example? |
||
October 27, 2011, 14:57 |
|
#4 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Of the top of my head, it seems like you'll need something like this:
Code:
label specName; foAll(h,speci) { specName = h[i].name(); volScalarField hiTemp ( IOobject ( specName, runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), h[i] ); hiTemp.write(); } Last edited by mturcios777; October 27, 2011 at 15:01. Reason: functionObjects comment |
|
October 28, 2011, 05:16 |
|
#5 |
New Member
yi Wang
Join Date: Feb 2011
Posts: 15
Rep Power: 15 |
Thanks a lot. I will try
|
|
January 31, 2012, 06:02 |
|
#6 |
New Member
feichi.Zhang
Join Date: Jul 2010
Posts: 1
Rep Power: 0 |
Do you have find h_i of the species? And how? Thanks.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |
OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x | wyldckat | OpenFOAM Bugs | 18 | October 21, 2010 06:51 |
lift and drag on ship superstructures | vaina74 | OpenFOAM Running, Solving & CFD | 3 | June 8, 2010 13:30 |
OpenFOAM 1.5.x package - CentOS 5.3 x86_64 | linnemann | OpenFOAM Installation | 7 | July 30, 2009 04:14 |
The OpenFOAM extensions project | mbeaudoin | OpenFOAM | 16 | October 9, 2007 10:33 |