hftga2foam |
written in 2006 by J. Voss
license: GPL (see file COPYING in source or binary packages)
Contents
From source:
1. unpack source tarball
2. run
make
3. run make install, if you want to install the
program hftga2foam and its documentation in the corresponding
subdirectories of /usr/local
or:
1. install source rpm
2.
run rpmbuild -bb hftga2foam.spec to create a binary rpm
installation package for your system
From precompiled binary packages:
• rpm -i hftga2foam-version-release-arch.rpm for linux
• unzip archive with binary for Win32
24bit .tga height fields can be generated with, e.g. POV-Ray or hf-lab
With hf-lab, height fields can be converted to .tga from other file formats.
You can also generate fractal height fields. By entering the following commands in hlx, a 64x64 height field fractal.tga is generated:
gforge 64 save "fractal.tga"
hftga2foam fractal.tga test/constant/polyMesh/blockMeshDict 1 0.5 5 2 0.01 1 1 1where the numbers mean:
In order to view the mesh in paraFOAM (i.e. ParaView), a directory test/system containing the files controlDict, fvSchemes, and fvSolutions has to be created (for a first test you can simply copy a set of these files from an OpenFOAM tutorial case).
The mesh is generated from the dictionary with:
blockMesh . testThe mesh can then be viewed with (see screenshot below):
paraFoam . test
The following POV-Ray example code will generate a .tga height field of a half sphere (see screenshot below):
#include "colors.inc" global_settings {hf_gray_16 on} camera{orthographic location <0,0,5> look_at <0,0,0> up 3.0*y right 3.0*x} sphere{<0,0,0> 1.0 texture{ pigment{ gradient z color_map{ [0.0 color Black] [1.000001 color White] } } finish{ambient 1.0} } }
Last
changed: