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

Write Cp

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2006, 09:14
Default If I want to write the Cp ever
  #1
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17
tangd is on a distinguished road
If I want to write the Cp every writeInterval, how do I change the code below:

template<class>
tmp<volscalarfield> hThermo<mixturetype>::Cp() const
{
const fvMesh& mesh = T_.mesh();

tmp<volscalarfield> tCp
(
new volScalarField
(
IOobject
(
"Cp",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0, 2, -2, -1, 0)
)
);

The obove was extracted from hThermo.C which I think is responsible for writing the value into the Cp file after a writeInterval. So by referencing other variable like p or T. I changed IOobject::NO_WRITE into IOobject::AUTO_WRITE. But still not saw Cp. How do I change the code correctly? Thank you so much!
tangd is offline   Reply With Quote

Old   July 25, 2006, 10:48
Default By the way, I clarify my quest
  #2
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17
tangd is on a distinguished road
By the way, I clarify my question. I'm using sonicTurbFoam and I set the thermoType as

hThermo<puremixture<sutherlandtransport<speciether mo<janafthermo<perfectgas>>>>> ;

The current situation is that after running a case, I intend to use postprocessing method like calcMassFlow or something like that to output the Cp value as well as h. My idea is that to read the Cp value from for example "0.003" directory. But the prerequisite must be that I write the Cp data into a file called Cp the same as p, T, U and so on. I also took a look at the basicThermo.C and .H, but I cannot move forward now, can someone give me a hand? Thanks!
tangd 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
Help me please..Write udf define_CG_motion Apple FLUENT 1 July 21, 2009 07:31
Write at last iteration diegon OpenFOAM Running, Solving & CFD 2 December 5, 2006 06:03
Write .cas and .dat for Unsteady TK FLUENT 2 September 12, 2005 06:53
UDF TO WRITE OUT DATA!! Aishwarya FLUENT 0 August 12, 2004 11:11
How to write CCL 2 computers Kemi CFX 1 May 3, 2004 19:09


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