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

Write control with conditional bool in source code.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2021, 06:48
Default Write control with conditional bool in source code.
  #1
New Member
 
Join Date: May 2016
Posts: 11
Rep Power: 10
samwong is on a distinguished road
hi everyone,

I defined a bool variable to store some calculation conditions.
I want to store all my variable just like controlDict does (at every writeTime) whenever the bool variable changes.
But I don't know how to implement it in to my code.

I guess there is some member function of Time class like Time.setDeltaT(dt) to control the output, but I just can't find a correct one.

Any help would be appreciated. Thank you
samwong is offline   Reply With Quote

Old   March 8, 2021, 05:44
Default
  #2
New Member
 
Join Date: May 2016
Posts: 11
Rep Power: 10
samwong is on a distinguished road
Just reply to my own question if anyone have the same question and didnt go through Time.H carefully.
runTime.writeNow() declared in Time.H write immediately and solves my problem.
samwong is offline   Reply With Quote

Reply

Tags
write control


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
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 62 October 2, 2022 04:50
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 09:06
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 10:17
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59


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