Using Blender to create solids for Gerris
From Gerris
(Difference between revisions)
| Revision as of 14:09, 15 March 2008 Prhlava (Talk | contribs) ← Previous diff |
Revision as of 14:10, 15 March 2008 Prhlava (Talk | contribs) Next diff → |
||
| Line 110: | Line 110: | ||
| === Example simulation === | === Example simulation === | ||
| + | |||
| + | (use "right click" + "save as" to download) | ||
| + | |||
| [http://www.dearm.co.uk/blender/blender_1.gfs gfs] | [http://www.dearm.co.uk/blender/blender_1.gfs gfs] | ||
| [http://www.dearm.co.uk/blender/blender_1.gfv gfv] | [http://www.dearm.co.uk/blender/blender_1.gfv gfv] | ||
| [http://www.dearm.co.uk/blender/blender_1.gts gts] | [http://www.dearm.co.uk/blender/blender_1.gts gts] | ||
| - | |||
| - | (use "right click" + "save as" to download) | ||
| To run the simulation: | To run the simulation: | ||
Revision as of 14:10, 15 March 2008
This is a short introduction to using Blender for creation of solid bodies for inclusion in Gerris simulation.
How to create a wing
Start with an empty scene (camera and light is OK)
Add Bezier curve
<space> -> add -> curve -> bezier curve
Close the curve
<TAB> <C>
Subdivide it
(curve) -> segments -> subdivide
Disable the Back and Front for the curve
De-select "Back" and "Front" (this is done in bottom window in blender)
Extrude the curve
Set the extrude level to 1
Convert the curve to mesh
<TAB> - Switch to object mode
(object) -> convert object type: Mesh
Close the top and bottom parts of the mesh
numpad<3> - switch to the side view <Tab> <B> - border select (select the top nodes)
(mesh) -> faces -> fill
<A> <B> - border select (select the bottom nodes)
(mesh) -> faces -> fill
Recalculate normals
<A> <A>
Now you should have all mesh nodes selected.
(mesh) -> normals -> recalculate inside
Export the mesh in STL format
<TAB> - go to object mode
Select the wing...
(File) -> Export -> STL
Save the file as wing.stl
STL to GTS
Convert from .stl to .gts
stl2gts < wing.stl > wing.gts
Transform the wing.gts
transform -o < wing.gts | transform -t 1 > blender_1.gts
The first transform normalizes the wing, the 2nd one moves it to 2nd cell along X axis. The resulting file "blender_1.gts" is ready for use in Gerris simulation.
Example simulation
(use "right click" + "save as" to download)
To run the simulation:
gerris2D blender_1.gfs | gfsview2D blender_1.gfv











