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

Writing custom function of flow field at every iteration

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2020, 18:16
Default Writing custom function of flow field at every iteration
  #1
New Member
 
Suraj Pawar
Join Date: Sep 2013
Posts: 10
Rep Power: 13
sap_92 is on a distinguished road
I have a question related to controlling the frequency at which the solution field is written in the folder. I can control the frequency of solution writing in controlDict using below parameters

Code:
writeControl timeStep;

writeInterval 200;
Basically, this will write a solution after every 200 time steps.

Now, I would like to create a custom function which computes the magnitude of velocity over the whole domain (sum of square of velocity u at every grid point) and write this variable to a text file or csv file at every time step while the simulation is running. How can I do it? I wont to keep the frequency of writing the entire solution (u,v,k,...) at 200 time steps only. Can someone please point me to resources that guides on how to create a custom function to compute some quantity at every time step in OpenFoam?
sap_92 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
[swak4Foam] swakExpression not writing to log alexfells OpenFOAM Community Contributions 3 March 16, 2020 19:19
Problem in sampling data of custom field function in ANSYS FLUENT v14 apek_great ANSYS 1 February 26, 2014 06:10
Mass Flow Rate Field Function RonBon STAR-CCM+ 0 February 19, 2013 09:58
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 14:06


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