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

Solve in Region0 then Region1

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2016, 13:25
Default Solve in Region0 then Region1
  #1
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Hi

Does anyone know how to alter a solver so that it solves in 2 (or more) stages, i.e region1, then region2?
I'm having trouble defining a region in the .C file. I've tried to copy the way chtMultiRegionFoam does it, but with little success. I'm not sure where it defines the regions in the solver. I can see where it does in the case.

Any help is appreciated!

Ali
ali.m.1 is offline   Reply With Quote

Old   January 29, 2016, 17:51
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
createRegionProperties.H reads the regionProperties and holds information about the regions. Look at this file and you will see what it does and what class it uses.

CHT solvers create a separate mesh for each region. This is in createFluidMeshes.H. They create fields on each mesh in createFluidFields.H, and they set references before running the solver algorithm in setFluid something or other. Can't remember. The algorithm is run in solveFluid.H I think.

In your case directory, each 'instance' can have a region subdirectory. By instance, I mean 'constant', 'system', or time directories. This is where each region stores its information.

Hope this helps.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   February 1, 2016, 11:26
Default
  #3
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Thanks David.

I'll take a look at those files. It's still quite difficult applying those things from the CHT solver to my own one!

Also, I don't think createRegionProperties.H exists.

Last edited by ali.m.1; February 1, 2016 at 12:32.
ali.m.1 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
solve equation michaelsmit OpenFOAM Running, Solving & CFD 4 March 24, 2011 06:35
Solve Flow or VOF simultaneously ? Ramsey FLUENT 1 February 16, 2011 14:16
Linearized NS euqations: how to solve them?(problem with Matrix operations..) matteoL OpenFOAM Running, Solving & CFD 0 November 18, 2009 07:58
Using Compressible Solver (sonicFoam) to solve subsonic flows ezsoal OpenFOAM 0 October 27, 2009 10:13
MAC method solve for pressure at boundry Ron Main CFD Forum 2 January 28, 2006 03:14


All times are GMT -4. The time now is 05:44.