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

Initial solution from potentialFoam (or similar)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2020, 09:04
Default Initial solution from potentialFoam (or similar)
  #1
Senior Member
 
Gerry Kan's Avatar
 
Gerry Kan
Join Date: May 2016
Posts: 353
Rep Power: 11
Gerry Kan is on a distinguished road
Howdy Foamers:

I have always been wondering about this and wanted to ask for your opinions.

I am setting up a transient run using a variant of rhoPimpleFoam, involving multiple species. To speed up initialization I would like to apply a steady-state initial flow field, possibly by using potentialFoam.

My questions are as follows:

1) Is it possible or advisable to do this in a single solver, i.e., the solver calling potentialFoam or solves for the steady potentialFoam through some code change?

2) Should a separate call to potentialFoam is required, how should I prescribe the results as initial solution?

Thank you very much in advance, Gerry.
Gerry Kan is offline   Reply With Quote

Old   February 19, 2020, 10:38
Default
  #2
Senior Member
 
Join Date: Jul 2013
Posts: 124
Rep Power: 13
wildfire230 is on a distinguished road
Hi Gerry,


I don't think it is advisable to do this with a single solver, it's best to keep things modular. First you should run potentialFoam, and then run your other solver with the output of potentialFoam as the initial condition for the new solver. If I remember correctly, potentialFoam actually directly overwrites the 0 directory, so you probably don't need to change anything and you can just directly launch the second solver. I might not be remembering correctly. If it doesn't overwrite 0, just change your startTime in your controlDict file to whatever time directory contains the output of potentialFoam.
wildfire230 is offline   Reply With Quote

Old   February 19, 2020, 11:34
Default
  #3
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,704
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Run potentialFoam and then your solver. You don't need to hack any solver. Use changeDictionary and scripting to make your life easier.


Actually you can just put this into your fvSolution dict to initialize using potentialFOAM.
Code:
potentialFlow
{
    nNonOrthogonalCorrectors 10;
}
LuckyTran is offline   Reply With Quote

Old   February 20, 2020, 10:21
Default
  #4
Senior Member
 
Gerry Kan's Avatar
 
Gerry Kan
Join Date: May 2016
Posts: 353
Rep Power: 11
Gerry Kan is on a distinguished road
Folks:

That's kind of what I thought. It might be easier to send a potentialFoam job and then rename the results to the initial conditions of the transient run.

Another question, though. Is there a way to introduce a weighting factor (between 0 and 1) so that I can set this initial condition as an interpolated average between the potentialFoam solution and the quiescent initial conditions?

Thanks in advance, Gerry.
Gerry Kan is offline   Reply With Quote

Old   February 20, 2020, 10:58
Default
  #5
Senior Member
 
Join Date: Jul 2013
Posts: 124
Rep Power: 13
wildfire230 is on a distinguished road
I haven't personally heard of an option to introduce such a weighting factor. If I were desperate to do that I would probably end up writing a small utility that reads the two fields and does the weighting. There is probably a more elegant way that I am not familiar with.
wildfire230 is offline   Reply With Quote

Reply


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
chtMultiRegionSimpleFoam: maximum number of iterations excedeed. Nkl OpenFOAM Running, Solving & CFD 19 October 10, 2019 02:42
HeatSource BC to the whole region in chtMultiRegionHeater xsa OpenFOAM Running, Solving & CFD 3 November 7, 2016 05:07
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 13:38
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 03:34


All times are GMT -4. The time now is 01:36.