Update use_custom_mesh authored by Adrien Crovato's avatar Adrien Crovato
...@@ -46,10 +46,12 @@ The grid associated to the volume (fluid), and the fixed, moving and internal bo ...@@ -46,10 +46,12 @@ The grid associated to the volume (fluid), and the fixed, moving and internal bo
morpher.setField('fld') # volume grid morpher.setField('fld') # volume grid
for fxd in ['fxd_0', 'fxd_1', ...]: for fxd in ['fxd_0', 'fxd_1', ...]:
morpher.addFixed(fxd) # fixed boundary morpher.addFixed(fxd) # fixed boundary
morpher.addMoving('mov') # moving boundary for mov in ['mov_0', 'mov_1', ...]:
morpher.addInternal('wk', 'wk_') # pair of internal boundaries morpher.addMoving(mov) # moving boundary
for intl in ['intl_0', 'intl_1', ...]:
morpher.addInternal(intl, intl+'_') # pair of internal boundaries
``` ```
where `'fld'` is the name of the physical group of the mesh contaning the volume grid (fluid), `'fxd_i'` is the name of the ith physical group of the mesh contaning a fixed boundary, `'mov'` is the name of the physical group of the mesh contaning the moving boundary (typically, a body), and `'wk','wk_'` is the pair of names of the physical groups of the mesh contaning the internal boundaries (typically, a wake). Note that several pair of internal boundaries can be added by repeating the last instruction. where `'fld'` is the name of the physical group of the mesh contaning the volume grid (fluid), `'fxd_i'` is the name of the ith physical group of the mesh contaning a fixed boundary, `'fxd_i'` is the name of the ith physical group of the mesh contaning a moving boundary (typically, a body), and `'intl_i','intl_i_'` is the pair of names of the ith physical group of the mesh containing the internal boundaries (typically, a wake).
For 3D computations, if the problem contains a symmetry plane, it can be added as, For 3D computations, if the problem contains a symmetry plane, it can be added as,
```python ```python
morpher.setSymmetry('sym', 1) morpher.setSymmetry('sym', 1)
...@@ -61,7 +63,10 @@ morpher.initialize() ...@@ -61,7 +63,10 @@ morpher.initialize()
``` ```
and can be latter executed using, and can be latter executed using,
```python ```python
morpher.savePos() # save the initial position of the nodes of the moving boudnary # set the new positions of the nodes of the moving boundary, typically
# set the new positions of the nodes of the moving boundary, and then call for n in mov.nodes:
morpher.deform() # perform the volume deformation for idim in range(3):
n.pos += dx
# then call
morpher.run() # perform the volume deformation
``` ```