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

How to change boundary condition after a specific timein parallel solver?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2021, 12:45
Default How to change boundary condition after a specific timein parallel solver?
  #1
New Member
 
Alexander Yurishchev
Join Date: Feb 2019
Posts: 21
Rep Power: 7
alextau is on a distinguished road
Hello,

I ran a simulation till 30 seconds run time, reconstucted the case removed all processors folders. Now I'd like to change velocity inlet boundary and continue the run from the same run time (30 seconds).

What are my steps for changing the velocity? Is it right to change the U boundary in 0 folder, then apply the command decompose -latestTime and then run my application at startTime latestTime in controlDict? Or the change must be made in the 30 folder? Please help, I am confused.

Thank you,
Alex.
alextau is offline   Reply With Quote

Old   April 18, 2021, 16:56
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 736
Rep Power: 14
Tobermory will become famous soon enough
Typically I would start by making a copy of the old 30 folder somewhere, so you have a copy of it, in case you need to go back to it. Now just edit the U file in the 30 time folder ... the search for the word "boundary", since you'll have all the internal field data first (this may be in binary, but the boundary names etc will still be in ASCII). Then just restart from this 30 time folder, with the latestTime flag as you noted (you'll need ro decompose again, with latestTime flag).

Good luck.
Tobermory is offline   Reply With Quote

Old   April 19, 2021, 02:28
Default
  #3
New Member
 
Alexander Yurishchev
Join Date: Feb 2019
Posts: 21
Rep Power: 7
alextau is on a distinguished road
Great thank you!!! How do I search for text in terminal? For now I opened U file usng gedit command, however I could not find boundary there...
alextau is offline   Reply With Quote

Old   April 19, 2021, 05:14
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 736
Rep Power: 14
Tobermory will become famous soon enough
For large files, I find that gedit struggles to open them. From a terminal, I use vim (I am old school), and you can search for the word boundaryField very simply by just typingh
Code:
/boundaryField
Another terminal tool that I see being used often is nano ... I haven't tried that myself though.
Tobermory is offline   Reply With Quote

Old   April 19, 2021, 06:37
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,198
Rep Power: 27
Yann will become famous soon enough
Hello,

Another way around would be to use the "changeDictionary" utility to update your boundary conditions. You can directly use it in parallel, on the latest time, in order to avoid reconstructing your case.
Have a look to the tutorials to get more details, but your changeDictionaryDict should look like this, or something similar, depending on the OF version you are using :

Code:
U
{
    boundaryField
    {
        my_inlet_patch
        {
            type            fixedValue;
            value           uniform (0 0 0); //just set your desired velocity vector
        }
    }
 }
Cheers,
Yann
Tobermory likes this.
Yann is online now   Reply With Quote

Old   April 20, 2021, 02:25
Default
  #6
New Member
 
Alexander Yurishchev
Join Date: Feb 2019
Posts: 21
Rep Power: 7
alextau is on a distinguished road
Thank you. This is also very helpfull!
alextau is offline   Reply With Quote

Old   November 8, 2021, 11:16
Default
  #7
New Member
 
Join Date: Jan 2020
Posts: 26
Rep Power: 6
PSander is on a distinguished road
Hello,
I am facing a similar problem. I run a case in parallel until a steady state equilibrium is reached. Then I would like to change my inlet velocity and as well calculate transient.
Therefore I did what you explained, additionatly I change in system folder from "steady state" to "Euler". After a few iterations the simulation crashes with a negative initial temperature. Do you know, what the problem could be?
PSander is offline   Reply With Quote

Old   November 8, 2021, 11:21
Default
  #8
New Member
 
Alexander Yurishchev
Join Date: Feb 2019
Posts: 21
Rep Power: 7
alextau is on a distinguished road
Well, I faced the same problem and there are many suggestions how to solve it here. Decreasing the maximum Courant number is what was helpful for me, but obviously it will increase your computation time…
alextau is offline   Reply With Quote

Old   November 9, 2021, 13:15
Default
  #9
New Member
 
Join Date: Jan 2020
Posts: 26
Rep Power: 6
PSander is on a distinguished road
Thank you for your fast reply. My courant number should be low enough, since my maxCo =1 and adjustTimeStep = true, or not?

I managed to change my inlet, but it is only working while I stay on steady state calculation. The negative initial pressure is occuring, if I continue the run with euler. And it happens running it parallel and non parallel, this should not be problem.
PSander 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
foam-extend-4.1 release hjasak OpenFOAM Announcements from Other Sources 19 July 16, 2021 06:02
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 18:38
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 17:08
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44


All times are GMT -4. The time now is 04:39.