Difference between revisions of "MRFSimpleFoam"

From OpenFOAMWiki
m (Mesh Generation)
Line 5: Line 5:
 
This tutorial is aimed to generating the mesh in Gambit, importing and solving it with MRFSimpleFoam.
 
This tutorial is aimed to generating the mesh in Gambit, importing and solving it with MRFSimpleFoam.
  
== Mesh Generation ==
+
== Mesh Generation and Import ==
  
 
# generate two cylinders (r1=0.5 h1=1; r2=0.25, h2=0.5) and one cube (h3=0.3)[[Image:Objects.png|center|thumb|Domain generation]]
 
# generate two cylinders (r1=0.5 h1=1; r2=0.25, h2=0.5) and one cube (h3=0.3)[[Image:Objects.png|center|thumb|Domain generation]]
Line 12: Line 12:
 
# define continuum types (zones): rotor for cylinder 2, and stator for cylinder 1[[Image:Objects.png|center|thumb|Rotor/Stator domain]]
 
# define continuum types (zones): rotor for cylinder 2, and stator for cylinder 1[[Image:Objects.png|center|thumb|Rotor/Stator domain]]
 
# define boundaries (inlet, outlet, cubeWall, cylindricWall, sliderFace), and couple the interfaces (sliderFace)[[Image:boundaries.png|center|thumb|Boundaries]]
 
# define boundaries (inlet, outlet, cubeWall, cylindricWall, sliderFace), and couple the interfaces (sliderFace)[[Image:boundaries.png|center|thumb|Boundaries]]
# define the coupled interface as INTERIOR
+
# define the coupled interface as INTERIOR[[Image:couple.png|center|thumb|Couple interfaces]]
# generate tetrahedral mesh (0.05 size)[[Image:]]
+
# generate tetrahedral mesh (0.05 size)[[Image:mesh.png|center|thumb|Mesh]]
 
# export
 
# export
 
# fluentMeshToFoam ./ simulation geom/mrf.msh -writeSets -writeZones
 
# fluentMeshToFoam ./ simulation geom/mrf.msh -writeSets -writeZones
 +
 +
== Solver Running ==
 +
 +
Before you start the solver, another modification is needed: change in all the dictionaries the patch ''cubeWall'' with ''rotor'' and ''cylindricWall'' with ''stator''. Of course you could name this patches as it should from the beginning in Gambit, but I considered that in this way it will be clearer since the same name ''rotor'' appears in two places: zone and patch.
 +
The rotational axis, and the angular velocity are specified using a dictionary file named constant/MRFZones.
 +
The solver can be started as:
 +
MRFSimpleFoam ./ simulation

Revision as of 06:37, 31 March 2008

1 MRFSimpleFoam

1.1 Introduction

This tutorial is aimed to generating the mesh in Gambit, importing and solving it with MRFSimpleFoam.

1.2 Mesh Generation and Import

  1. generate two cylinders (r1=0.5 h1=1; r2=0.25, h2=0.5) and one cube (h3=0.3)
    Domain generation
  2. substract cylinder 2 from 1 (maintain cylinder 2)
  3. substract cube 3 from cylinder 2
  4. define continuum types (zones): rotor for cylinder 2, and stator for cylinder 1
    Rotor/Stator domain
  5. define boundaries (inlet, outlet, cubeWall, cylindricWall, sliderFace), and couple the interfaces (sliderFace)
    Boundaries
  6. define the coupled interface as INTERIOR
    Couple interfaces
  7. generate tetrahedral mesh (0.05 size)
    Mesh
  8. export
  9. fluentMeshToFoam ./ simulation geom/mrf.msh -writeSets -writeZones

1.3 Solver Running

Before you start the solver, another modification is needed: change in all the dictionaries the patch cubeWall with rotor and cylindricWall with stator. Of course you could name this patches as it should from the beginning in Gambit, but I considered that in this way it will be clearer since the same name rotor appears in two places: zone and patch. The rotational axis, and the angular velocity are specified using a dictionary file named constant/MRFZones. The solver can be started as: MRFSimpleFoam ./ simulation