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

Writing face centre values

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2014, 07:09
Default Writing face centre values
  #1
Senior Member
 
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 154
Rep Power: 12
AshwaniAssam is on a distinguished road
Hi all,

Is runTime.write() is only for writing volume fields? If yes what is the equivalent for writing face values.

For

surfaceScalarField Mach_sf = M_Lplus +M_Rminus;

I want to write at runtime value of Mach_sf.

Ashwani
AshwaniAssam is offline   Reply With Quote

Old   February 28, 2014, 11:11
Default
  #2
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 14
ahmmedshakil is on a distinguished road
You can have a look at the writeCellCentres utility, and Mach_sf.write() should work .
ahmmedshakil is offline   Reply With Quote

Old   March 2, 2014, 04:01
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning,

No, runTime outputting also works for surfaceField<Type>, but you should make sure that you do not define your field inside a scope, such that it is deleted, once runTime.write() is executed.

If these things is not a problem, then it might be the write properties of the field, which can be changed with something along the following line:

Code:
fieldName.regIOobject::writeOpt() = IOobject::AUTO_WRITE;
Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj 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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
FvMatrix coefficients shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 14:38
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42
Assigning face values into nodes syavash FLUENT 2 September 19, 2012 20:46
face and cell centered values danihuso OpenFOAM 0 July 17, 2009 11:01


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