-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from antjost/devZextrude
[IBM] Move extrude 2D to 3D IBM from Apps/IBM.py to IBM.py in each relevant module.
- Loading branch information
Showing
6 changed files
with
603 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
Cassiopee/Connector/test/ToBeCompletedIBMinterpolateExtrude2Dto3D.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
## DO NOT RUN THIS TEST CASE - IT IS IN PROGRESS AND WILL BE COMPLETED SHORTLY | ||
|
||
# extrude 2D mesh to 3D with Cartesian approach | ||
import Converter.PyTree as C | ||
import Converter.Mpi as Cmpi | ||
import Transform.PyTree as T | ||
import Converter.Internal as Internal | ||
import Generator.IBM as G_IBM | ||
import Geom.IBM as Geom | ||
import Connector.IBM as X_IBM | ||
import KCore.test as test | ||
import sys | ||
|
||
LOCAL = test.getLocal() | ||
bodySurfaceFile = LOCAL + '/naca0012.cgns' | ||
|
||
Lcharac = 0.03362355 | ||
Lz = 0.2*Lcharac | ||
dfar = 10.*Lcharac | ||
vmin = 16; | ||
snears = 1; | ||
|
||
###Generate 2D Mesh | ||
t2D,tc2D=X_IBM.prepareIBMDataPara(bodySurfaceFile , None , None , | ||
snears=snears , dfar=dfar , vmin=vmin ) | ||
test.testT(t2D ,1) | ||
test.testT(tc2D,2) | ||
#C.convertPyTree2File(t2D,LOCAL+'/t2D_checking.cgns') | ||
|
||
####Extrusion for 3D Mesh | ||
bodySurface = C.convertFile2PyTree(bodySurfaceFile) | ||
|
||
extrusion = 'cart' | ||
span = Lz | ||
NPas = 10+1 #number of nodes | ||
t3D, tb3D = G_IBM.extrudeCartesianZDir(t2D, bodySurface, extrusion=extrusion, NPas=NPas, span=span, dz=span/(NPas-1), isAutoPeriodic=True) | ||
|
||
for t in [t3D,tb3D]: | ||
zmax = C.getMaxValue(t, 'CoordinateZ'); | ||
zmin = C.getMinValue(t, 'CoordinateZ'); | ||
zavg = (zmax+zmin)/2 | ||
T._translate(t, (0,0,0-zavg)) | ||
test.testT(t3D ,3) | ||
test.testT(tb3D ,4) | ||
|
||
#C.convertPyTree2File(t3D,LOCAL+'/t3D_checking.cgns') | ||
#C.convertPyTree2File(tb3D,LOCAL+'/tb3D_checking.cgns') | ||
|
||
#####Interpolation 3D | ||
t3D, tc3D = X_IBM.prepareIBMDataExtrude(tb3D, None, None, t3D, extrusion=extrusion) | ||
test.testT(t3D ,5) | ||
test.testT(tc3D ,6) | ||
|
Oops, something went wrong.