OpenFOAM对网格进行平移和缩放

网格已经生成后,可以通过 transformPoints 网格进行平移和缩放等操作。

网格平移操作:

transformPoints -translate '(1 0 0)'

平移效果:

 网格缩放操作:

transformPoints -scale '(0.1 0.1 0.1)'

缩放效果:

 通过 transformPoints -help 可以查看其他用法:

xxxx@XXXXXXX:/mnt/f/snappyHexMesh$ transformPoints -help

Usage: transformPoints [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -fileHandler <handler>
                    override the fileHandler
  -listFunctionObjects
                    List functionObjects
  -listRegisteredSwitches
                    List switches registered for run-time modification
  -listScalarBCs    List scalar field boundary conditions (fvPatchField<scalar>)
  -listSwitches     List switches declared in libraries but not set in
                    etc/controlDict
  -listUnsetSwitches
                    List switches declared in libraries but not set in
                    etc/controlDict
  -listVectorBCs    List vector field boundary conditions (fvPatchField<vector>)
  -noFunctionObjects
                    do not execute functionObjects
  -parallel         run in parallel
  -region <name>    specify alternative mesh region
  -rollPitchYaw <vector>
                    transform in terms of '(roll pitch yaw)' in degrees
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -rotate <(vectorA vectorB)>
                    transform in terms of a rotation between <vectorA> and
                    <vectorB> - eg, '( (1 0 0) (0 0 1) )'
  -rotateFields     read and transform vector and tensor fields too
  -scale <vector>   scale by the specified amount - eg, '(0.001 0.001 0.001)'
                    for a uniform [mm] to [m] scaling
  -translate <vector>
                    translate by the specified <vector> - eg, '(1 0 0)'
  -yawPitchRoll <vector>
                    transform in terms of '(yaw pitch roll)' in degrees
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Using: OpenFOAM-5.x (see www.OpenFOAM.org)
Build: 5.x

 

posted @ 2025-07-03 15:21  希望先生  阅读(87)  评论(0)    收藏  举报