|
[Sponsors] |
How to initialise simulation with solution from previous simulation? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 18, 2024, 10:08 |
How to initialise simulation with solution from previous simulation?
|
#1 |
New Member
Tommy Nee
Join Date: Sep 2023
Posts: 11
Rep Power: 3 |
Hi!
I'm relatively new to OpenFOAM and I'm looking to initialise a simpleFoam simulation around an aerofoil using the kOmegaSST model with the solution I obtained from running the same simulation with the Spalart-Allmaras model, as was recommended on this blog post here to overcome some of the issues with the kOmegaSST model. My question is simply how do I go about this. I know to change the startFrom in the controlDict to latestTime, then I'm guessing I copy in the k and omega fields to the latest time folder as these values are not calculated by the Spalart-Allmaras model. However when I tried all of this, the model's residuals just continued on a straight line and nothing seemed to change. I think I need to change something with the convergence criteria but I'm not sure what to change. Any help on this would be greatly appreciated! I understand this is probably a fairly simple question but I can't seem to find any steps on exactly what to change to perform this. Thanks! |
|
February 19, 2024, 14:37 |
|
#2 |
Member
Shravan
Join Date: Mar 2017
Posts: 75
Rep Power: 9 |
Hello,
If you would like to continue with calculated values of k and omega fields, then you can use the following functionObject. https://www.openfoam.com/documentati...8H_source.html You can output the fields and then start your simulation (with start from latestTime) but with kOmegaSST. This may help Thanks |
|
February 20, 2024, 06:41 |
|
#3 |
New Member
Tommy Nee
Join Date: Sep 2023
Posts: 11
Rep Power: 3 |
Hi, thanks for replying! It's more for me that I don't really know how to set up the new case with the kOmegaSST model implemented. By this i mean do I create a new case folder and use mapFields to transfer the U,p and nut fields so that they can be used as the new initial conditions for the kOmegaSST run, or do I just replace the turbulence model, alter the convergence criteria (in some way, I wouldn't be sure how) and change the strartFrom to latestTime within the same case folder. I'm sorry, I know this is probably quite a basic question but I'm struggling with it at the moment.
Thanks! |
|
February 20, 2024, 15:09 |
|
#4 |
Member
Shravan
Join Date: Mar 2017
Posts: 75
Rep Power: 9 |
Hi,
I think you can do either ways. Make sure you have made the following changes: 1) Have the necessary fields in the latestTime folder (for instance in your case additionally k and omega). Note – you should use the correct (physical) values. For example as I mentioned you can try to calculate the other needed turbulent quantities using the turbulenceFields functionObject. Also, use appropriate/correct BC so that the simulation doesn’t crash 2) Add the required linear solver properties and schemes to new variables (k and omega) in fvSolutions file and fvSchemes files respectively 3) An easy way to check if your case is okay is to take a tutorial where kOmegaSST is used and try to be consistent in all your case files with that tutorial 4) startFrom latestTime with the new turbulence model (changed) Regarding using turbulenceFields In case you use OpenFOAM foundation versions, the turbulenceFields cannot give you omega (because turbulenceFields needs k and epsilon to calculate omega). (See from line 76) https://cpp.openfoam.org/v9/turbulen...8C_source.html Also see this post: Issue about values of omega, k using SpalarAllmaras You have it in the ESI version of OpenFOAM (v2106). So one way will be to move to using the ESI version. If you don’t want to move from Foundation to ESI, you can try to use k epsilon model instead of SpalartAllmaras first and then change to kOmegaSST (but I do not know if you prefer that) Regarding residuals and convergence after changing your turbulence model If you have problems with convergence if you change the turbulence model, I would suggest start with 1st order schemes (e.g. Euler for time and upwind schemes), play with outer/inner correctors, play with underrelaxation factors (for steady cases) and after the residuals stabilize you can slowly change them to the original ones desired. Also, try reducing your time step size or reduce maximum Courant number (with "adjustTimeStep on;") Note if you want to change any of the files when the solver is running and if you want to OpenFOAM to read it immediately (while running), choose HTML Code:
runTimeModifiable yes; |
|
February 21, 2024, 14:12 |
|
#5 |
New Member
Tommy Nee
Join Date: Sep 2023
Posts: 11
Rep Power: 3 |
Hi!
Thanks very much for your very in depth reply, I will be sure to try all the above methods. I have a kOmegaSST model running okay-ish now but I'd imagine some of these will definitely improve it. Thanks again! |
|
Tags |
initialization, komegasst, simplefoam, turbulence models |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unsteady Simulation from steady Solution | hussein93 | Main CFD Forum | 2 | February 8, 2024 08:49 |
Simulation beginning from initialized solution rather than restart file | eskimmel | SU2 | 2 | June 19, 2023 11:03 |
Time-accurate solution restart from steady state solution | jyotir | SU2 | 6 | December 8, 2021 09:34 |
Not getting converged solution in transient simulation | Julian121 | CFX | 6 | April 27, 2019 03:00 |
How can I use solution from one simulation as initial condition on a remote solver? | Dano62 | CFX | 0 | October 21, 2015 18:45 |