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

It is possible OpenFoam saves only the velocity field in every timestep?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By clapointe
  • 1 Post By Aina

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 14, 2021, 12:16
Default It is possible OpenFoam saves only the velocity field in every timestep?
  #1
New Member
 
Aina
Join Date: Jan 2020
Location: Spain
Posts: 9
Rep Power: 6
Aina is on a distinguished road
Dear all, currently I'm doing a 3D simulation using kOmegaSST. I need to save in every timestep the velocity field instead of all variable fields (k, omega, p, nut, etc.). It is possible?
I can't see in controlDict any option to do this.

Thanks a lot!
Aina is offline   Reply With Quote

Old   January 14, 2021, 13:11
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
I'm not sure how to do it without modifying the code (maybe someone can jump in here). But but to get you an answer this can be done by incorporating some small changes to e.g., pimpleFoam :

First, copy the solver and rename it to something like myPimpleFoam (make sure to update Make/files as well and have it compile to $FOAM_USER_APPBIN). Then, instead of

Code:
runTime.write()
in the run loop we can use something like

Code:
//see if it is time to write data
if (runTime.writeTime())
{
    //only write U
    U.write();
}
Caelan
rarnaunot likes this.
clapointe is offline   Reply With Quote

Old   January 15, 2021, 08:41
Default
  #3
New Member
 
Aina
Join Date: Jan 2020
Location: Spain
Posts: 9
Rep Power: 6
Aina is on a distinguished road
It works exactly as you said

Thank you!
Aina
rarnaunot likes this.
Aina is offline   Reply With Quote

Old   January 19, 2021, 13:44
Default
  #4
Member
 
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10
fedez91 is on a distinguished road
Unless you want to make a cool video, I don't know why you would want to do that. If you need to postprocess every time-step it may be better to do it during the run-time and avoid saving lots of files that will occupy a lot of space in your hard-drive.
fedez91 is offline   Reply With Quote

Reply

Tags
controldict, save variable field


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
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
potential flows, helmholtz decomposition and other stuffs pigna Main CFD Forum 1 October 26, 2017 09:34
change velocity field LM4112 OpenFOAM Running, Solving & CFD 12 February 5, 2014 12:56
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 03:13


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