Difference between revisions of "Contrib AlignMeshSurf"

From OpenFOAMWiki
 
 
(One intermediate revision by the same user not shown)
Line 28: Line 28:
 
* write the new mesh for next time step
 
* write the new mesh for next time step
  
== Example ==
+
 
 +
== Examples ==
 +
=== alignMeshTest case ===
 +
[[Media:alignMeshTest.tar.gz|Case gzipped]]
 +
 
 
Original mesh (only a cut) and surfaces of a test case
 
Original mesh (only a cut) and surfaces of a test case
  
Line 36: Line 40:
  
 
[[Image:alignMeshSurf_newMesh.jpg]]
 
[[Image:alignMeshSurf_newMesh.jpg]]
 +
 +
=== scourCylinder case ===
 +
[[Media:AlignMeshSurf_scourCylinder.tar.gz|Case gzipped]]
 +
 +
[[Image:alignMeshSurf_cylMesh.jpg]]
 +
 +
 +
This case may be useful for those simulating flow around cylinders or piers, especially with a scoured irregular bed.
 +
 +
The <tt>m4</tt> preprocessor is used for initial mesh generation -
 +
there is a scheme of mesh blocks and flow domain dimensions in the tar file. If you need explanation on the preprocessing, please, see [[HowTo_blockMesh_with_m4]].
 +
 +
Create the initial mesh with <tt>blockMesh</tt> and move the points with:
 +
 +
alignMeshSurf . scourCylinder Scour.stl Top.stl
 +
 +
The new mesh is written to <tt>0.005</tt> directory (<tt>deltaT</tt>). Change the <tt>startTime</tt> value in the <tt>controlDict</tt> and you can now start the simulation - the case is defined for <tt>icoFoam</tt> solver.
  
 
== Download ==
 
== Download ==
  
[[Media:alignMeshSurf.tar.gz|The tar file with the sources]]. Works with OpenFOAM 1.3.
+
[[Media:alignMeshSurf.tar.gz|A tar file with the alignMeshSurf sources]]. Works with OpenFOAM 1.3.
  
And the [[Media:alignMeshTest.tar.gz| Test case]].
 
  
  
 
--[[User:Rpasiok|Rpasiok]] 18:25, 22 Nov 2006 (CET)
 
--[[User:Rpasiok|Rpasiok]] 18:25, 22 Nov 2006 (CET)

Latest revision as of 10:00, 27 November 2006

Valid versions: OF version 13.png

1 Short description

Moves mesh points in the Z direction so that the bottom and top faces are aligned with provided surfaces,

2 Usage

Needs two inputs:

  1. lower and
  2. upper surface file name


The code assumes the following about the original mesh and the surfaces:

  • both surfaces have to cover original mesh in the XY-plane - it needs surfaces height Z for XY-position of each mesh point
  • internal mesh points keep their relative distance between bottom and top faces - the original relative distance is based on mesh bounding box rather than local faces height. It is good idea to have your original top and bottom faces flat (const Z).


The command

alignMeshSurf . alignMeshTest bottomSurf.stl topSurf.ftr

will :

  • take alignMeshTest case mesh for startFrom time,
  • align the bottom mesh face with bottomSurf.stl surface and the top mesh face with topSurf.ftr surface
  • move internal mesh points vertically and
  • write the new mesh for next time step


3 Examples

3.1 alignMeshTest case

Case gzipped

Original mesh (only a cut) and surfaces of a test case

AlignMeshSurf oldMesh.jpg

and the aligned mesh

AlignMeshSurf newMesh.jpg

3.2 scourCylinder case

Case gzipped

AlignMeshSurf cylMesh.jpg


This case may be useful for those simulating flow around cylinders or piers, especially with a scoured irregular bed.

The m4 preprocessor is used for initial mesh generation - there is a scheme of mesh blocks and flow domain dimensions in the tar file. If you need explanation on the preprocessing, please, see HowTo_blockMesh_with_m4.

Create the initial mesh with blockMesh and move the points with:

alignMeshSurf . scourCylinder Scour.stl Top.stl

The new mesh is written to 0.005 directory (deltaT). Change the startTime value in the controlDict and you can now start the simulation - the case is defined for icoFoam solver.

4 Download

A tar file with the alignMeshSurf sources. Works with OpenFOAM 1.3.


--Rpasiok 18:25, 22 Nov 2006 (CET)