CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

mapFields between two different OpenFOAM solvers

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By GerhardHolzinger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 10, 2019, 16:12
Question mapFields between two different OpenFOAM solvers
  #1
New Member
 
pooyan
Join Date: Mar 2013
Location: Boston, US
Posts: 6
Rep Power: 13
pooyanni is on a distinguished road
Hi everyone,

I am trying to run a compressible flow simulation using the rhoCentralFoam solver. However, due to convergence issues, I want to improve my initial conditions in the domain from the solution of another solver on the same geometry and mesh. Is it possible to use mapFields for this purpose between two different solvers? For example using icoFoam solution as the initial condition for rhoCentralFoam (although density is not resolved in the icoFoam).

As a more general question, what are the ways to provide a more realistic boundary condition to improve the solution speed and convergence in more expensive simulations.

Thanks
pooyanni is offline   Reply With Quote

Old   June 11, 2019, 08:43
Default
  #2
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Yes, you can.

And now for more details

You can create an incompressible twin-case to compute a velocity field with which to initialize the compressible case.

With the incompressible case, you can initialize this case using the potentialFoam solver.


Note, that you should not map the pressure field, since the pressure has different dimensional units in the incompressible and compressible case.

Also, the phi field has a different dimension in incompressible and compressible cases.


Since mapFields maps all matching fields between two cases, you need to restrict the mapping to U, and possibly the turbulent fields.
GerhardHolzinger is offline   Reply With Quote

Old   June 11, 2019, 13:46
Default
  #3
New Member
 
pooyan
Join Date: Mar 2013
Location: Boston, US
Posts: 6
Rep Power: 13
pooyanni is on a distinguished road
Quote:
Originally Posted by GerhardHolzinger View Post
Yes, you can.

And now for more details

You can create an incompressible twin-case to compute a velocity field with which to initialize the compressible case.

With the incompressible case, you can initialize this case using the potentialFoam solver.


Note, that you should not map the pressure field, since the pressure has different dimensional units in the incompressible and compressible case.

Also, the phi field has a different dimension in incompressible and compressible cases.


Since mapFields maps all matching fields between two cases, you need to restrict the mapping to U, and possibly the turbulent fields.
Hi Gerhard,

Thanks for your response. That's good news! Do you know of any tutorial that explains this in more details. I am wondering how can I specify only the velocity field during mapFields operation? I looked at "mapFields -help" but could not find any options related to that.

Regards
pooyanni is offline   Reply With Quote

Old   June 14, 2019, 06:57
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
In the case that a tool does let you specify certain fields, simply make sure that the intended fields are the only ones that are present.


Since, you can't tell mapFields to only map the U field, follow such a procedure:

  • Run the source case, i.e. the case from which you want to map the solution
  • Define all fields of the destination case, the case you want to map onto, in the 0.org folder
  • Create an empty 0 folder, and copy only U from 0.org to 0
  • Map the solution from the source case to the destination case, since U is the only field in the 0 folder, only U is mapped
  • Copy the remaining fields from 0.org to 0
pooyanni likes this.
GerhardHolzinger is offline   Reply With Quote

Old   June 14, 2019, 12:09
Default
  #5
New Member
 
pooyan
Join Date: Mar 2013
Location: Boston, US
Posts: 6
Rep Power: 13
pooyanni is on a distinguished road
Quote:
Originally Posted by GerhardHolzinger View Post
In the case that a tool does let you specify certain fields, simply make sure that the intended fields are the only ones that are present.


Since, you can't tell mapFields to only map the U field, follow such a procedure:

  • Run the source case, i.e. the case from which you want to map the solution
  • Define all fields of the destination case, the case you want to map onto, in the 0.org folder
  • Create an empty 0 folder, and copy only U from 0.org to 0
  • Map the solution from the source case to the destination case, since U is the only field in the 0 folder, only U is mapped
  • Copy the remaining fields from 0.org to 0
That makes sense. Thanks a lot for the guidance!

Best
pooyanni is offline   Reply With Quote

Reply

Tags
initial conditions, mapfields


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
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 14:24
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days joegi.geo OpenFOAM Announcements from Other Sources 0 October 1, 2016 19:20
OpenFOAM Training: Programming CFD Course 12-13 and 19-20 April 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 14, 2016 10:19
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 03:18
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36


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