|
[Sponsors] |
Manually change boundary conditions during runs |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 24, 2016, 08:47 |
Manually change boundary conditions during runs
|
#1 |
Member
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 12 |
Hi,
I am running a few cases based on the incompressible/simpleFoam/turbineSiting tutorial. I need to run the simulation for several wind speed and same direction. The approach I am using is the following: 1 - Set Uref (reference velocity) to my first windspeed 2 - Run until convergence 3 - Change Uref to the next windspeed 4 - Run until convergence 5 - ..... The idea is that convergence should be faster for windspeeds after the first as I start from a flow that is already developed. The issue I am having is that when I replace the Uref nothing seems to change. It seems that the first boundary condition is still being used and I have verified this by looking at the results in Paraview. I am sure I am doing something wrong, but can't understand what. Any suggestion? Thanks |
|
March 25, 2016, 04:01 |
|
#2 |
Senior Member
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12 |
Well, the problem is the results folder structure in OF. If you start your calculation, OF uses the U data given in the /0 folder. When OF writes out the results, it creates a separate folder /1000 (for example) with the intermediate field value results of the calculation. If you now continue the calculation, OF will use this data to calculate the solution - still the same low velocity.
In short: you can't use your solution of the 5m/s calculation to speed up the 10m/s calculation. What you can do: change the line in controlDict from: Code:
startFrom latestTime; Code:
startFrom startTime; Cheers, Alex |
|
March 26, 2016, 06:49 |
|
#3 |
Member
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 12 |
Thanks Alex.
Of course this means that the solution will be reinitialised? Cheers |
|
March 26, 2016, 11:51 |
|
#4 |
Senior Member
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12 |
Hi Ruggiero,
I guess you will have to start every calculation of yours from the initial conditions. I'd choose the following way: - create a sample folder with all conditions set - make x copies (for x number of runs) of the folder and name them folder1,folder2 etc. (for example) - write a bash script that changes the directories in a loop and starts the calculation with potentialFoam / decompose / start. This way you can leave the computer alone for some days and eventually just read out the results. Your first idea, initialize higher velocity results with converged lower velocity solutions isn't gonna work as OpenFOAM then reads the lower velocity U field and tries to converge to this velocity instead of reading the new values. Cheers Alex |
|
March 26, 2016, 17:22 |
|
#5 |
Member
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 12 |
Thanks Kina for your advice.
|
|
August 4, 2017, 22:33 |
|
#6 |
Member
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15 |
Hi Ruggiero,
I want to do exactly the same thing you want. Did you solve the problem, or just did what Alex suggested? One way to do it is editing the U and other files from your latest time step, but there is one problem here... It probably is a huge file, and it would take a long time to edit it, so for me it seems unfeasible. If you found another way please tell me! Best Regards, Luis |
|
August 5, 2017, 05:24 |
|
#7 |
Member
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 12 |
Hi Luis,
I ended up changing my whole workflow so I didn't have to run multiple simulations. The last thing I was looking at though, was mapfields. If you make it work, I would be very curious to know how you did it :-) |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
non reflective boundary conditions for incompresible flow | Pascal_doran | OpenFOAM Programming & Development | 16 | August 25, 2015 05:35 |
Problem with SIMPLEC-like finite volume channel flow boundary conditions | ghobold | Main CFD Forum | 3 | June 15, 2015 11:14 |
Difficulty In Setting Boundary Conditions | Moinul Haque | CFX | 4 | November 25, 2014 17:30 |
Setting rotating frame of referece. | RPFigueiredo | CFX | 3 | October 28, 2014 04:59 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 17:44 |