SlideShare a Scribd company logo
1 of 7
Download to read offline
How to set up a basic case for 
chtMultiRegionFoam 
Bernhard Linseisen 
July 21, 2011 
Abstract 
The OpenFOAM-solver chtMultiRegionFoam is meant to be used for 
heat-transfer between a solid and a fluid originally. As it does work with 
different regions of different properties, the setup is a little different from 
the other OF-cases. 
This HowTo is written for setting up a very basic case for chtMultiRegion- 
Foam (cMRF) in an OF-2 installation. It might work for earlier versions 
as well, but it might fail as well. 
This HowTo is a first version and it worked on my personal machine for 
the particular testcase I set up. If there are any bugs or errors in it, please 
drop me an email. 
1 The Case built in this Test 
The case for this HowTo is a simple step with warm solid parts, which is subected 
to an airflow. A visualization (not true to size and relation!) can be seen in 1 
For the length 20 units have been chosen, height and depth are 1 unit each. 
The main setup files (blockMeshDict and howtocase.setSet) can be seen in the 
attachment. 
2 Construction of the Case 
The main time factor for setting up a case for chtMultiRegionFoam is the basic 
construction of the case. The preparation and the running later on are merely 
a question of few minutes. 
2.1 The Basic Directory Structure 
The very basic structure of the case is identical to any other cases within OF. 
So at first build a structure like that in a directory for the case at hand (in this 
HowTo named ¡case¿ for simplicity): 
bernhard.linseisen@cern.ch 
1
Air1 
Solid1 
Air2 
Solid2 
Figure 1: Visualization of the Case 
cd case 
mkdir 0 
mkdir constant 
mkdir system 
2.2 The .setSet-File 
Within the case folder you have to make a file with the ending “.setSet” which 
gives the different regions in the process later. The sample file for this case is 
attached for simplicity. 
The basic idea behind this file is one of different “sets” of cells, faces or points. 
The sets constructed with help of the .setSet-file later become the regions for cht- 
MultiRegionFoam. One can see this file as a kind of dictionary-file for the setSet-command 
within OF. While the different options for this file are described within 
setSet.C within the path /applications/utilities/mesh/manipulation/setSet/ of 
your OF2-installation, the commands used in this HowTo are briefly explained 
with the first two lines of the file 4 as examples: The line 
cellSet Solid1 new boxToCell (0 0 0) (10 0.3 1) 
does build a “set” from a “cell” with the name “Solid1”. The “new” action shows 
it will be a new set. The source for the cellSet-function is the “boxToCell”- 
function, which is used in other parts of the code as well. The numbers in 
brackets are parameters for the boxToCell-function, here building a cell from a 
rectangular box spanning between the points with coordinates (0 0 0) and (10 
0.3 1). 
The line 
cellZoneSet Solid1 new setToCellZone Solid1 
does build a “zoneset” from another cellset. The basics are identical to above. 
Only the source has changed, being the setToCellZone-function with the input 
parameter Solid1, which was established in the line above. So basically the 
structure within the .setSet-file is as follows: 
2
function setName action source 
The further available functions and actions can be found within setSet.C . 
2.3 Setup of the 0 Directory 
Bring in the necessary parameter files as usual. For chtMultiRegionFoam it is 
necessary to have files for: epsilon, k, p, p rgh, T, U, Ychar and Ypmma. These 
files are identical to what one would find in any other ¡case¿/0-directory. There 
is one major exception: The description for “boundaryField” has to look as 
follows: 
boundaryField 
{ 
.* 
{ 
type calculated; 
value uniform standardvalue; 
} 
} 
In Addition, for each of the regions planned there has to be a folder within the 
0 directory, so in this case it would be: 
cd case/0 
mkdir Air1 
mkdir Air2 
mkdir Solid1 
mkdir Solid2 
Within each of these directories further files have to be made: For the solid 
regions: T, Ychar and Ypmma. For the fluid regions: epsilon, g, k, p, p rgh, T 
and U. These files are to be set up like any other standard parameter file. In 
addition to the boundaries on the outside of the complete simulation domain it 
is necessary to enter additional boundary conditions for any of the boundaries 
between the regions. These are built according to following scheme: 
{ 
regionname1_to_regionname2 
{ 
... 
} 
} 
While testing the BC “calculated” did not work for these, “zeroGradient” was 
working well at least from the numeric side. 
Furtheron each of the “regional” folders has to contain a file called “cellToRe-gion”. 
This file is built like any other BC-definition-file, with the type either 
being “zeroGradient” or “calculated”, the latter one with “value uniform 0;”. 
Possibly other parameters would work as well, but only these have been tested. 
In any case every boundary to another cell has to be described, ideally outside 
BC is zeroGradient while inside BC is calculated. 
3
2.4 Setup of the constant Directory 
Within the constant-folder it is necessary again to produce all the regional 
folders: 
cd case/constant 
mkdir Air1 
mkdir Air2 
mkdir Solid1 
mkdir Solid2 
Within this folder it also is necessary to build (or copy from elsewhere) a file 
called “regionProperties”. This file tells which solvers will have to be applied 
to the different regions, either the ones for a fluid or the ones for a solid. An 
example for this file can be seen in the Attachment 4. 
As is standard for the other cases, also here it is necessary to set up a standard 
“polymesh”-directory, including a standard “blockMeshDict”-file. 
In contrast to a standard case, the files defining the other Properties have to 
go into the different regional folders, i.e. “transportProperties” and “thermo-physicalProperties” 
within the folders for fluid regions and “solidThermophysi-calProperties” 
within the folders for the solid regions. 
2.5 Setup of the system Directory 
Fo into the system directory and once again set up the folders for the regions: 
cd case/system 
mkdir Air1 
mkdir ... 
Get a working controlDict-file, for example from the tutorials into this folder. 
Afterwards get (or produce) a dummy fvSchemes-file. This one is the same 
as any other fvSchemes, except for the different functions containing no values 
between the curly brackets. Furtheron one has to get a fvSolution which only 
defines the outer correctors into this folder. 
It is optional to get a “decomposeParDict” file for the case one opts for do-ing 
parallel computations. For all of the different regional folders: Get a 
decomposeParDict-file and get full fvSchemes and fvSolution files into the fold-ers. 
For the latter ones, keep in mind that they will be different for the fluids 
and for the solids! 
3 Final Preparations and Running of the Case 
The last part mainly should work without any further problems. For the prepa-ration, 
do 
cd case 
blockMesh 
setSet -batch file.setSet 
splitMeshRegions -cellZones -overwrite 
4
Furtheron you have to remove the solid fields from the fluid regions and the 
fluid fields from the solid regions. It is advisable to simply use that part of the 
“Allrun” script. 
Unfortunately, part of the commands before seems to overwrite the data in the 
¡case¿/0/¡region¿/* files, so now it is necessary to set these values in the follow-ing 
way: Change the values within the newly added boundaries at the region-connections 
to something different from 0. Change the type of the boundary 
conditions for U, T and p rgh to something different from calculated. After this 
is done you can start the simulation like usual with 
chtMultiRegionFoam 
4 Reminder 
If you find any errors, please do inform me! Else: Have fun with chtMultiRe-gionFoam! 
5
Attachment 
howToCase.setSet 
cellSet Solid1 new boxToCell (0 0 0) (10 0.3 1) 
cellZoneSet Solid1 new setToCellZone Solid1 
cellSet Solid2 new boxToCell (10 0 0) (20 0.5 1) 
cellZoneSet Solid2 new setToCellZone Solid2 
cellSet Air1 new boxToCell (0 0.3 0) (10 1 1) 
cellZoneSet Air1 new setToCellZone Air1 
cellSet Air2 new boxToCell (10 0.5 0) (20 1 1) 
cellZoneSet Air2 new setToCellZone Air2 
Figure 2: howToCase.setSet 
6
regionProperties 
/*--------------------------------*- C++ -*----------------------------------* 
| ========= | | 
|  / F ield | OpenFOAM: The Open Source CFD Toolbox | 
|  / O peration | Version: 2.0.0 | 
|  / A nd | Web: www.OpenFOAM.com | 
| / M anipulation | | 
*---------------------------------------------------------------------------*/ 
FoamFile 
{ 
version 2.0; 
format ascii; 
class dictionary; 
location constant; 
object regionProperties; 
} 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
fluidRegionNames ( Air1 Air2 ); 
solidRegionNames ( Solid1 Solid2 ); 
// ************************************************************************* // 
Figure 3: regionProperties 
7

More Related Content

What's hot

CFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMCFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAM
Fumiya Nozaki
 
OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!
Fumiya Nozaki
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming Tips
Fumiya Nozaki
 
Limited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAMLimited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAM
Fumiya Nozaki
 
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
Fumiya Nozaki
 

What's hot (20)

OpenFOAMによる混相流シミュレーション入門
OpenFOAMによる混相流シミュレーション入門OpenFOAMによる混相流シミュレーション入門
OpenFOAMによる混相流シミュレーション入門
 
CFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMCFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAM
 
OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化
 
OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming Tips
 
Limited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAMLimited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAM
 
PreCICE CHT with OpenFOAM and CalculiX
PreCICE CHT with OpenFOAM and CalculiXPreCICE CHT with OpenFOAM and CalculiX
PreCICE CHT with OpenFOAM and CalculiX
 
About dexcs2021 for OpenFOAM
About dexcs2021 for OpenFOAMAbout dexcs2021 for OpenFOAM
About dexcs2021 for OpenFOAM
 
Mixer vessel by cfmesh
Mixer vessel by cfmeshMixer vessel by cfmesh
Mixer vessel by cfmesh
 
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
 
OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析
 
Turbulence Models in OpenFOAM
Turbulence Models in OpenFOAMTurbulence Models in OpenFOAM
Turbulence Models in OpenFOAM
 
Basic openfoa mtutorialsguide
Basic openfoa mtutorialsguideBasic openfoa mtutorialsguide
Basic openfoa mtutorialsguide
 
DEXCS2022 for preCICE
DEXCS2022 for preCICEDEXCS2022 for preCICE
DEXCS2022 for preCICE
 
Of tutorials v1806
Of tutorials v1806Of tutorials v1806
Of tutorials v1806
 
FSI analysis with preCICE (OpenFOAM and CalculiX)
FSI analysis with preCICE (OpenFOAM and CalculiX) FSI analysis with preCICE (OpenFOAM and CalculiX)
FSI analysis with preCICE (OpenFOAM and CalculiX)
 
OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例
 
OpenFOAMの壁関数
OpenFOAMの壁関数OpenFOAMの壁関数
OpenFOAMの壁関数
 
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
 
OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読
 

Viewers also liked

Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
takuyayamamoto1800
 
Optimization of relaxation factor for simple solver, OpenFOAM Study Meeting f...
Optimization of relaxation factor for simple solver, OpenFOAM Study Meeting f...Optimization of relaxation factor for simple solver, OpenFOAM Study Meeting f...
Optimization of relaxation factor for simple solver, OpenFOAM Study Meeting f...
Masashi Imano
 
Optimization of parameter settings for GAMG solver in simple solver, OpenFOAM...
Optimization of parameter settings for GAMG solver in simple solver, OpenFOAM...Optimization of parameter settings for GAMG solver in simple solver, OpenFOAM...
Optimization of parameter settings for GAMG solver in simple solver, OpenFOAM...
Masashi Imano
 

Viewers also liked (8)

Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
 
OpenFOAM Training v5-1-en
OpenFOAM Training v5-1-enOpenFOAM Training v5-1-en
OpenFOAM Training v5-1-en
 
OpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on trainingOpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on training
 
Puc Darpa Combustao
Puc Darpa CombustaoPuc Darpa Combustao
Puc Darpa Combustao
 
CFD - OpenFOAM
CFD - OpenFOAMCFD - OpenFOAM
CFD - OpenFOAM
 
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
 
Optimization of relaxation factor for simple solver, OpenFOAM Study Meeting f...
Optimization of relaxation factor for simple solver, OpenFOAM Study Meeting f...Optimization of relaxation factor for simple solver, OpenFOAM Study Meeting f...
Optimization of relaxation factor for simple solver, OpenFOAM Study Meeting f...
 
Optimization of parameter settings for GAMG solver in simple solver, OpenFOAM...
Optimization of parameter settings for GAMG solver in simple solver, OpenFOAM...Optimization of parameter settings for GAMG solver in simple solver, OpenFOAM...
Optimization of parameter settings for GAMG solver in simple solver, OpenFOAM...
 

Similar to How to chtmultiregionfoam

Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernel
Raghu nath
 
Vsam interview questions and answers.
Vsam interview questions and answers.Vsam interview questions and answers.
Vsam interview questions and answers.
Sweta Singh
 
There are 4 part for the project and the question may be long to rea.docx
There are 4 part for the project and the question may be long to rea.docxThere are 4 part for the project and the question may be long to rea.docx
There are 4 part for the project and the question may be long to rea.docx
susannr
 
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
BertrandDrouvot
 
There are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docxThere are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docx
susannr
 

Similar to How to chtmultiregionfoam (20)

Lab 10 nmr n1_2011
Lab 10 nmr n1_2011Lab 10 nmr n1_2011
Lab 10 nmr n1_2011
 
Readme
ReadmeReadme
Readme
 
Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernel
 
Algorithm2e package for Latex
Algorithm2e package for LatexAlgorithm2e package for Latex
Algorithm2e package for Latex
 
Basilisk Guide.pdf
Basilisk Guide.pdfBasilisk Guide.pdf
Basilisk Guide.pdf
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
Inspection and maintenance tools (Linux / OpenStack)
Inspection and maintenance tools (Linux / OpenStack)Inspection and maintenance tools (Linux / OpenStack)
Inspection and maintenance tools (Linux / OpenStack)
 
Unix.system.calls
Unix.system.callsUnix.system.calls
Unix.system.calls
 
Mirroring the root_disk under solaris SVM
Mirroring the root_disk under solaris SVMMirroring the root_disk under solaris SVM
Mirroring the root_disk under solaris SVM
 
Vsam interview questions and answers.
Vsam interview questions and answers.Vsam interview questions and answers.
Vsam interview questions and answers.
 
Maxbox starter19
Maxbox starter19Maxbox starter19
Maxbox starter19
 
Linux intro 5 extra: makefiles
Linux intro 5 extra: makefilesLinux intro 5 extra: makefiles
Linux intro 5 extra: makefiles
 
Operating System Assignment Help
Operating System Assignment HelpOperating System Assignment Help
Operating System Assignment Help
 
There are 4 part for the project and the question may be long to rea.docx
There are 4 part for the project and the question may be long to rea.docxThere are 4 part for the project and the question may be long to rea.docx
There are 4 part for the project and the question may be long to rea.docx
 
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
 
101 3.1 gnu and unix commands v4
101 3.1 gnu and unix commands v4101 3.1 gnu and unix commands v4
101 3.1 gnu and unix commands v4
 
2023comp90024_linux2.pdf
2023comp90024_linux2.pdf2023comp90024_linux2.pdf
2023comp90024_linux2.pdf
 
AdvFS Storage (domain) Threshold Alerts
AdvFS Storage (domain) Threshold AlertsAdvFS Storage (domain) Threshold Alerts
AdvFS Storage (domain) Threshold Alerts
 
3.1 gnu and unix commands v4
3.1 gnu and unix commands v43.1 gnu and unix commands v4
3.1 gnu and unix commands v4
 
There are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docxThere are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docx
 

Recently uploaded

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Recently uploaded (20)

ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 

How to chtmultiregionfoam

  • 1. How to set up a basic case for chtMultiRegionFoam Bernhard Linseisen July 21, 2011 Abstract The OpenFOAM-solver chtMultiRegionFoam is meant to be used for heat-transfer between a solid and a fluid originally. As it does work with different regions of different properties, the setup is a little different from the other OF-cases. This HowTo is written for setting up a very basic case for chtMultiRegion- Foam (cMRF) in an OF-2 installation. It might work for earlier versions as well, but it might fail as well. This HowTo is a first version and it worked on my personal machine for the particular testcase I set up. If there are any bugs or errors in it, please drop me an email. 1 The Case built in this Test The case for this HowTo is a simple step with warm solid parts, which is subected to an airflow. A visualization (not true to size and relation!) can be seen in 1 For the length 20 units have been chosen, height and depth are 1 unit each. The main setup files (blockMeshDict and howtocase.setSet) can be seen in the attachment. 2 Construction of the Case The main time factor for setting up a case for chtMultiRegionFoam is the basic construction of the case. The preparation and the running later on are merely a question of few minutes. 2.1 The Basic Directory Structure The very basic structure of the case is identical to any other cases within OF. So at first build a structure like that in a directory for the case at hand (in this HowTo named ¡case¿ for simplicity): bernhard.linseisen@cern.ch 1
  • 2. Air1 Solid1 Air2 Solid2 Figure 1: Visualization of the Case cd case mkdir 0 mkdir constant mkdir system 2.2 The .setSet-File Within the case folder you have to make a file with the ending “.setSet” which gives the different regions in the process later. The sample file for this case is attached for simplicity. The basic idea behind this file is one of different “sets” of cells, faces or points. The sets constructed with help of the .setSet-file later become the regions for cht- MultiRegionFoam. One can see this file as a kind of dictionary-file for the setSet-command within OF. While the different options for this file are described within setSet.C within the path /applications/utilities/mesh/manipulation/setSet/ of your OF2-installation, the commands used in this HowTo are briefly explained with the first two lines of the file 4 as examples: The line cellSet Solid1 new boxToCell (0 0 0) (10 0.3 1) does build a “set” from a “cell” with the name “Solid1”. The “new” action shows it will be a new set. The source for the cellSet-function is the “boxToCell”- function, which is used in other parts of the code as well. The numbers in brackets are parameters for the boxToCell-function, here building a cell from a rectangular box spanning between the points with coordinates (0 0 0) and (10 0.3 1). The line cellZoneSet Solid1 new setToCellZone Solid1 does build a “zoneset” from another cellset. The basics are identical to above. Only the source has changed, being the setToCellZone-function with the input parameter Solid1, which was established in the line above. So basically the structure within the .setSet-file is as follows: 2
  • 3. function setName action source The further available functions and actions can be found within setSet.C . 2.3 Setup of the 0 Directory Bring in the necessary parameter files as usual. For chtMultiRegionFoam it is necessary to have files for: epsilon, k, p, p rgh, T, U, Ychar and Ypmma. These files are identical to what one would find in any other ¡case¿/0-directory. There is one major exception: The description for “boundaryField” has to look as follows: boundaryField { .* { type calculated; value uniform standardvalue; } } In Addition, for each of the regions planned there has to be a folder within the 0 directory, so in this case it would be: cd case/0 mkdir Air1 mkdir Air2 mkdir Solid1 mkdir Solid2 Within each of these directories further files have to be made: For the solid regions: T, Ychar and Ypmma. For the fluid regions: epsilon, g, k, p, p rgh, T and U. These files are to be set up like any other standard parameter file. In addition to the boundaries on the outside of the complete simulation domain it is necessary to enter additional boundary conditions for any of the boundaries between the regions. These are built according to following scheme: { regionname1_to_regionname2 { ... } } While testing the BC “calculated” did not work for these, “zeroGradient” was working well at least from the numeric side. Furtheron each of the “regional” folders has to contain a file called “cellToRe-gion”. This file is built like any other BC-definition-file, with the type either being “zeroGradient” or “calculated”, the latter one with “value uniform 0;”. Possibly other parameters would work as well, but only these have been tested. In any case every boundary to another cell has to be described, ideally outside BC is zeroGradient while inside BC is calculated. 3
  • 4. 2.4 Setup of the constant Directory Within the constant-folder it is necessary again to produce all the regional folders: cd case/constant mkdir Air1 mkdir Air2 mkdir Solid1 mkdir Solid2 Within this folder it also is necessary to build (or copy from elsewhere) a file called “regionProperties”. This file tells which solvers will have to be applied to the different regions, either the ones for a fluid or the ones for a solid. An example for this file can be seen in the Attachment 4. As is standard for the other cases, also here it is necessary to set up a standard “polymesh”-directory, including a standard “blockMeshDict”-file. In contrast to a standard case, the files defining the other Properties have to go into the different regional folders, i.e. “transportProperties” and “thermo-physicalProperties” within the folders for fluid regions and “solidThermophysi-calProperties” within the folders for the solid regions. 2.5 Setup of the system Directory Fo into the system directory and once again set up the folders for the regions: cd case/system mkdir Air1 mkdir ... Get a working controlDict-file, for example from the tutorials into this folder. Afterwards get (or produce) a dummy fvSchemes-file. This one is the same as any other fvSchemes, except for the different functions containing no values between the curly brackets. Furtheron one has to get a fvSolution which only defines the outer correctors into this folder. It is optional to get a “decomposeParDict” file for the case one opts for do-ing parallel computations. For all of the different regional folders: Get a decomposeParDict-file and get full fvSchemes and fvSolution files into the fold-ers. For the latter ones, keep in mind that they will be different for the fluids and for the solids! 3 Final Preparations and Running of the Case The last part mainly should work without any further problems. For the prepa-ration, do cd case blockMesh setSet -batch file.setSet splitMeshRegions -cellZones -overwrite 4
  • 5. Furtheron you have to remove the solid fields from the fluid regions and the fluid fields from the solid regions. It is advisable to simply use that part of the “Allrun” script. Unfortunately, part of the commands before seems to overwrite the data in the ¡case¿/0/¡region¿/* files, so now it is necessary to set these values in the follow-ing way: Change the values within the newly added boundaries at the region-connections to something different from 0. Change the type of the boundary conditions for U, T and p rgh to something different from calculated. After this is done you can start the simulation like usual with chtMultiRegionFoam 4 Reminder If you find any errors, please do inform me! Else: Have fun with chtMultiRe-gionFoam! 5
  • 6. Attachment howToCase.setSet cellSet Solid1 new boxToCell (0 0 0) (10 0.3 1) cellZoneSet Solid1 new setToCellZone Solid1 cellSet Solid2 new boxToCell (10 0 0) (20 0.5 1) cellZoneSet Solid2 new setToCellZone Solid2 cellSet Air1 new boxToCell (0 0.3 0) (10 1 1) cellZoneSet Air1 new setToCellZone Air1 cellSet Air2 new boxToCell (10 0.5 0) (20 1 1) cellZoneSet Air2 new setToCellZone Air2 Figure 2: howToCase.setSet 6
  • 7. regionProperties /*--------------------------------*- C++ -*----------------------------------* | ========= | | | / F ield | OpenFOAM: The Open Source CFD Toolbox | | / O peration | Version: 2.0.0 | | / A nd | Web: www.OpenFOAM.com | | / M anipulation | | *---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location constant; object regionProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // fluidRegionNames ( Air1 Air2 ); solidRegionNames ( Solid1 Solid2 ); // ************************************************************************* // Figure 3: regionProperties 7