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

Manually change boundary conditions during runs

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 24, 2016, 09:47
Default Manually change boundary conditions during runs
  #1
New Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 24
Rep Power: 5
Rojj is on a distinguished road
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
Rojj is offline   Reply With Quote

Old   March 25, 2016, 05:01
Default
  #2
Member
 
Alex
Join Date: Jan 2014
Posts: 94
Rep Power: 4
Kina is on a distinguished road
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;
to
Code:
startFrom       startTime;
This way, OF will use the /0 data (that you can modify during the runs) for each new simulation.

Cheers,
Alex
Kina is offline   Reply With Quote

Old   March 26, 2016, 07:49
Default
  #3
New Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 24
Rep Power: 5
Rojj is on a distinguished road
Thanks Alex.

Of course this means that the solution will be reinitialised?

Cheers
Rojj is offline   Reply With Quote

Old   March 26, 2016, 12:51
Default
  #4
Member
 
Alex
Join Date: Jan 2014
Posts: 94
Rep Power: 4
Kina is on a distinguished road
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
Kina is offline   Reply With Quote

Old   March 26, 2016, 18:22
Default
  #5
New Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 24
Rep Power: 5
Rojj is on a distinguished road
Thanks Kina for your advice.
Rojj is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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 18:30
Setting rotating frame of referece. RPFigueiredo CFX 3 October 28, 2014 05:59
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44


All times are GMT -4. The time now is 19:43.