|
[Sponsors] |
Determining the calculation sequence of the regions in multe regions calculation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 8, 2016, 11:36 |
Determining the calculation sequence of the regions in multe regions calculation
|
#1 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
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 |
|
March 8, 2016, 13:08 |
|
#2 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
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) { ... } |
|
March 8, 2016, 16:18 |
Background
|
#3 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
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 |
|
March 9, 2016, 01:16 |
|
#4 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
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 And the following changes in Make/files Code:
myChtMultiRegionSimpleFoam.C EXE = $(FOAM_USER_APPBIN)/myCMultiRegionSimpleFoam 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" } 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 \ |
|
March 9, 2016, 04:07 |
done
|
#5 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Hello Bloerb,
thanks a lot for the answer and the steps. I made it and it works. Regards, Peter |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |