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

Change fvSchemes on the Fly with Script

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2015, 09:28
Question Change fvSchemes on the Fly with Script
  #1
New Member
 
Fabian
Join Date: Apr 2015
Location: Germany
Posts: 2
Rep Power: 0
Boudgoust is on a distinguished road
Hi everyone,

I want to change my fvSchemes "on the Fly" during a simulation in simpleFoam. But I have to do so many simulation, that i want to write a script, which is changing it for me. I thought i could use Allrun for it, but I just don't know how. Maybe somebody here could help me. The conditions to change the fvSchemes could be a specific iterationstep like 100 or a timestep like 60 seconds. Further I'm thinking about starting with turbulance off in RASProberties and switching it on after 10 or 20 iterationsteps. Should someone be so kind as to help me, I would really appreciate his/her help.

Kind regards, Fabian
Boudgoust is offline   Reply With Quote

Old   April 30, 2015, 11:44
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Function object "timeActivatedFileUpdate" should be what you're looking for. Example from the source code documentation:
Code:
fileUpdate1
{
    type              timeActivatedFileUpdate;
    functionObjectLibs ("libutilityFunctionObjects.so");
    outputControl     timeStep;
    outputInterval    1;
    fileToUpdate      "$FOAM_CASE/system/fvSolution";
    timeVsFile
    (
        (-1 "$FOAM_CASE/system/fvSolution.0")
        (0.10 "$FOAM_CASE/system/fvSolution.10")
        (0.20 "$FOAM_CASE/system/fvSolution.20")
        (0.35 "$FOAM_CASE/system/fvSolution.35")
    );
}
keanhong and C. Okubo like this.
__________________
wyldckat is offline   Reply With Quote

Old   April 30, 2015, 12:33
Default
  #3
New Member
 
Fabian
Join Date: Apr 2015
Location: Germany
Posts: 2
Rep Power: 0
Boudgoust is on a distinguished road
Thank you very much! *happy*
Boudgoust is offline   Reply With Quote

Reply

Tags
allrun, change fvschemes, script


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
[General] How to write a script to get multiple slices with paraview? kiddmax ParaView 19 November 7, 2016 01:57
Radiation interface hinca CFX 15 January 26, 2014 17:11
Do the cell IDs of a domain change on the fly? HakikiCanakkaleli OpenFOAM Running, Solving & CFD 3 August 15, 2013 05:00
[ICEM] Icem script failure Anna Tian ANSYS Meshing & Geometry 0 November 24, 2012 05:39
How to change molecular weight of a species in pdf-mixture Jenny_W FLUENT 0 November 3, 2012 16:49


All times are GMT -4. The time now is 22:48.