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

Determining the calculation sequence of the regions in multe regions calculation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 8, 2016, 11:36
Default Determining the calculation sequence of the regions in multe regions calculation
  #1
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 223
Rep Power: 12
peterhess is on a distinguished road
hello everybody,

do anybody knows how to determine the calculation sequence of the regions in multi regions calculation?

I made the following:

- three regions calculation. one of them is fluid and the other two are solid
- made all the necessary pre-processing for chtMultiRegionSimlieFoam
- started the calculation
- the calculation works in this sequence: fluid - solid1 - solid2
- in regionProporties dictionary I changed the sequence of the solids to solid2 then solid1
- restart calculation works in this sequence: fluid - solid2 - solid1
- result: by changing the calculation sequence in the regionProporties dictionary, you are able to control the calculation sequence of the solid regions...

Problem: how to change the sequence to let the fluid not the first calculated region?

Changing the regions in regionProporties
from:

fluid (fluid)
solid (solid1 solid2)

to:
solid (solid1 solid2)
fluid (fluid)

did not solved my problem...

Must I change something in chtMultiRegionSimpleFoam.c ?

regards,

Peter
peterhess is offline   Reply With Quote

Old   March 8, 2016, 13:08
Default
  #2
Senior Member
 
Join Date: Sep 2013
Posts: 255
Rep Power: 14
Bloerb will become famous soon enough
I do not see the reason for this change but yes you would need to recompile the solver. The solver now solves in the folling order:

Code:
        forAll(fluidRegions, i)
        {
                 ...
        }

        forAll(solidRegions, i)
        {
                ...
        }
You have to switch these two loops and that's it. But again there is no real reason to do this.
Bloerb is offline   Reply With Quote

Old   March 8, 2016, 16:18
Default Background
  #3
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 223
Rep Power: 12
peterhess is on a distinguished road
Hello bloerb,
Thanks for 4he answer!

The background is that i work on comparation between the two methods and their effect on the speed of the calculation.

Because the solid region (s) have heat source, the free convection is forced as an effect of the hot surfaces of the solid regions...I think the calculation should be faster, if the surfaces became faster (on) temperature...
That should (I think and want to examine) accelerate the calculation in solid and also the fluid regions...

I will try to change and recompile tomorow.
I will post also the results (if any) later.

Regards
Peter
peterhess is offline   Reply With Quote

Old   March 9, 2016, 01:16
Default
  #4
Senior Member
 
Join Date: Sep 2013
Posts: 255
Rep Power: 14
Bloerb will become famous soon enough
Most often people are trying to fix things on the wrong end hence my answer, but yes a valid concern. The following steps should get you where you want.

copy the solvers
Code:
cp -r $FOAM_SOLVERS/heatTransfer/chtMultiRegionFoam yourDirectory
rename chtMultiRegionSimpleFoam.C to myChtMultiRegionSimpleFoam.C

And the following changes in Make/files
Code:
myChtMultiRegionSimpleFoam.C

EXE = $(FOAM_USER_APPBIN)/myCMultiRegionSimpleFoam
now switch this part in myChtMultiRegionSimpleFoam.C to look like this:

Code:
        forAll(solidRegions, i)
        {
            Info<< "\nSolving for solid region "
                << solidRegions[i].name() << endl;
            #include "setRegionSolidFields.H"
            #include "readSolidMultiRegionSIMPLEControls.H"
            #include "solveSolid.H"
        }

        forAll(fluidRegions, i)
        {
            Info<< "\nSolving for fluid region "
                << fluidRegions[i].name() << endl;
            #include "setRegionFluidFields.H"
            #include "readFluidMultiRegionSIMPLEControls.H"
            #include "solveFluid.H"
        }
now just type wclean and wmake and you are done and should be able to use your new solver myChtMultiRegionSimpleFoam

You do need the chtMultiRegionFoam directory above it since in Make/options you can see that some files are used from there. You can ofcourse also copy every missing file from the chtMultiRegionFoam folders in your solid directory first.
Code:
EXE_INC = \
    -Ifluid \
    -Isolid \
    -I../solid \
Bloerb is offline   Reply With Quote

Old   March 9, 2016, 04:07
Default done
  #5
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 223
Rep Power: 12
peterhess is on a distinguished road
Hello Bloerb,

thanks a lot for the answer and the steps.

I made it and it works.

Regards,

Peter
peterhess is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning 097- AB Siemens 6 November 15, 2004 05:41


All times are GMT -4. The time now is 17:03.