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

On the fly solver switch from simpleFoam to PimpleFoam using solver control?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 29, 2021, 08:03
Post On the fly solver switch from simpleFoam to PimpleFoam using solver control?
  #1
New Member
 
Balaji
Join Date: May 2013
Posts: 21
Rep Power: 13
Nealcaffrey is on a distinguished road
Hi Foamers,

I would like to know if anyone have already implemented on-the-fly solver switch from steady state to transient state.

For example :

Lets says I start my simulation with steady state solver "simpleFoam" and let it converged till 1000 iterations.

Now I would like to switch it automatically to transient solver "pimpleFoam" starting from 1000th iteration and running for additional 2000 iterations till 3000 steps.

Is there anyway to setup the shell script to switch the solvers/fvSchemes/fvSolutions automatically on-the-fly ?

Cause, starting transient solver from converged steady state solution would be the best practice.

I have seen the tutorial on openfoam v2012, there are only scripts for solverControls to change the timestep, set max Courant number and Alpha number. It would be nice if anyone could point out some tutorials , that have already implemented the steady-> transient state switch.

Thanks in advance for your suggestion and replies
Nealcaffrey is offline   Reply With Quote

Old   November 29, 2021, 08:48
Default
  #2
Member
 
s1291's Avatar
 
Join Date: Aug 2017
Location: Algeria
Posts: 98
Rep Power: 8
s1291 is on a distinguished road
Probably you need to use timeActivatedFileUpdate function object. Below is an example from the documentation.

Example usage to update the fvSolution dictionary at various times throughout the calculation:

Code:
fileUpdate1
{
    type              timeActivatedFileUpdate;
    libs              (utilityFunctionObjects);
    writeControl      timeStep;
    writeInterval     1;
    fileToUpdate      "<system>/fvSolution";
    timeVsFile
    (
        (-1   "<system>/fvSolution.0")
        (0.10 "<system>/fvSolution.10")
        (0.20 "<system>/fvSolution.20")
        (0.35 "<system>/fvSolution.35")
    );
    ...
}
__________________
"When in doubt, use brute force." -- Ken Thompson
s1291 is offline   Reply With Quote

Reply

Tags
pimplefoam, solvercontrol, steadytotransient


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
[ANSYS Meshing] Help with element size sandri_92 ANSYS Meshing & Geometry 14 November 14, 2018 07:54
Water droplets in gas with Lagrangian solver & SimpleFoam idnis OpenFOAM Programming & Development 1 July 8, 2014 01:54
Solver Control via .pre file with Perl script ahlo CFX 1 March 7, 2008 12:33
Solver Control Anantha CFX 1 September 4, 2007 13:30
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32


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