|
[Sponsors] |
How to restart simulation using results from other solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 20, 2016, 18:38 |
How to restart simulation using results from other solver
|
#1 |
Member
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11 |
Dear all
I have a question, which might be helpful for others as well. Could anyone please tell me how can I restart a simulation in a solver using the results from a different solver. I know I can do that using latestTime option of the controlDict, but that is if I want to restart using the same solver. But if I want to use the restarting criteria (results) from another solver, how can I do that. For example, suppose pisoFoam gives me a simulation results and I want to use those results as my starting criteria for simulation using another solver- icoFoam (I am just making up solver names). Any of your helpful suggestion or comment will be highly appreciated and helpful for the community. Thanks ~Sheikh Ahmed |
|
September 21, 2016, 02:27 |
|
#2 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Dear Sheikh Ahmed,
If you are using the same mesh with the new simulation, you can simply copy the latest time step folder to the new case folder where you are using the new solver. You may also rename the folder to 0. If you are not using the same mesh, then you can use mapFields utility to interpolate the solution from the old case to the new case. Best, Mikko |
|
September 21, 2016, 05:36 |
|
#3 | |
Member
Join Date: Feb 2015
Posts: 39
Rep Power: 11 |
Hi,
you can work with flowkersma's solution. But -latestTime should work as well, I use it all the time. Quote:
As a third option you could also run Code:
mapFields -parallelSource -parallelTarget -sourceTime latestTime /folder/of/your/old/simulation |
||
September 21, 2016, 17:50 |
|
#4 |
Member
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11 |
Thank you very much Flowkersma and Mikko for your prompt replies. According to your suggestions, I copied the U file of the latest time to the new solver's time folder and could run without error. I couldnt copy the whole 'time folder' since my older solver solves only P and U, whereas my new solver solves P, T, U etc. Also, the units of P were different (P/rho in pisoFoam and P in laminarSMOKE) and thats why I couldnt copy P as well.
Any idea or suggestion regarding the process I am using? I dont need the mapFieldsDict right now since I am using identical mesh sizes, but I have to use that for my future runs for sure. Thanks once again and please share if you have any new thoughts. ~SFA |
|
September 21, 2016, 17:51 |
|
#5 |
Member
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11 |
I am sorry, thanks to Mikko and HenningW
|
|
September 22, 2016, 01:51 |
|
#6 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
I think that is fine what you are doing but note that the meshes have to be exactly same between the two cases. Probably, that is the case for you because you did not get any errors regarding that. If you want to use the P from incompressible case, you can change the unit and calculate the absolute pressure for compressible solver with foamCalc.
|
|
September 22, 2016, 12:57 |
|
#7 |
Member
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11 |
Thanks Mikko. Could you tell me the foamCalc command to convert phi to p as you mentioned.
|
|
September 23, 2016, 13:25 |
|
#8 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
You probably mean how to convert the pressure (p/rho) from the incompressible solver to the compressible solver. If that's the case, the syntax for foamCalc should be something like
Code:
foamCalc scalarMult p -value 1.2 -resultName p foamCalc addSubtract p add -value 100000 -resultName p Code:
dimensions [0 2 -2 0 0 0 0]; Code:
dimensions [1 -1 -2 0 0 0 0]; |
|
July 5, 2019, 07:02 |
|
#9 |
Senior Member
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 8 |
Hey Flowkersma,
now seems that the foamCalco doen't work, with OpenFOAM 6. Now one should use postProcess utilities. Do you have any idea how to convert your string? Thanks a lot, Carlo |
|
Tags |
latesttime, restart solution |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX Solver does not write the results file and returns with error code 1 | zeeshans | CFX | 17 | November 16, 2023 12:11 |
fluent divergence for no reason | sufjanst | FLUENT | 2 | March 23, 2016 17:08 |
OF-2.3.x: interPhaseChange(DyM)Foam: simulation restart leads to non-physical fields | A_Pete | OpenFOAM Bugs | 0 | August 12, 2015 10:16 |
Instability in transonic coupled solver simulation | MachZero | Main CFD Forum | 0 | February 17, 2015 21:47 |
interrupt the simulation, check results, continue simulation | soulsaver | Phoenics | 1 | June 28, 2013 02:15 |