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

how to output hi in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mturcios777

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2011, 04:56
Default how to output hi in OpenFoam
  #1
New Member
 
yi Wang
Join Date: Feb 2011
Posts: 15
Rep Power: 15
yiwang25 is on a distinguished road
hello,everyone

In Openfoam, How to output speices specific enthalpy hi?
Any comments, please
yiwang25 is offline   Reply With Quote

Old   October 24, 2011, 12:12
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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.
mgg likes this.
mturcios777 is offline   Reply With Quote

Old   October 27, 2011, 04:31
Default
  #3
New Member
 
yi Wang
Join Date: Feb 2011
Posts: 15
Rep Power: 15
yiwang25 is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
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.
mturcios777:

Thank you very much! would you like to show me an example?
yiwang25 is offline   Reply With Quote

Old   October 27, 2011, 13:57
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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();
}
Not being super familiar with runTime post-processing, I'm not exactly sure where this should be located, but it seems like you should try adapt the fourth example on the OpenFOAM page I linked earlier (the one that calculated the average pressure). Change the outputControl to something that will write at the writeInterval (don't know what the option is, it may well be writeInterval). Good luck

Last edited by mturcios777; October 27, 2011 at 14:01. Reason: functionObjects comment
mturcios777 is offline   Reply With Quote

Old   October 28, 2011, 04:16
Default
  #5
New Member
 
yi Wang
Join Date: Feb 2011
Posts: 15
Rep Power: 15
yiwang25 is on a distinguished road
Thanks a lot. I will try
yiwang25 is offline   Reply With Quote

Old   January 31, 2012, 05:02
Default
  #6
New Member
 
feichi.Zhang
Join Date: Jul 2010
Posts: 1
Rep Power: 0
fezh is on a distinguished road
Do you have find h_i of the species? And how? Thanks.
fezh is offline   Reply With Quote

Reply


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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 05: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 05:51
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 12:30
OpenFOAM 1.5.x package - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 7 July 30, 2009 03:14
The OpenFOAM extensions project mbeaudoin OpenFOAM 16 October 9, 2007 09:33


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