Feb. 24, 2007. Takuya OSHIMA
Jul. 8, 2008 update: This page is kept only for archival reason. Please use the third revision of OpenFOAM 1.4 unofficial Cygwin port released from the OpenFOAM extensions project (OpenFOAM-1.4-3.cygwin.src.tar.bz2) instead.
Jan. 8, 2008 update: There's also a precompiled binary of ParaView 3.3-CVS snapshot for Windows here.
Oct. 24, 2007 update: FoamX-cygwin has been integrated into the third revision of OpenFOAM 1.4 unofficial Cygwin port released from the OpenFOAM extensions project (OpenFOAM-1.4-3.cygwin.src.tar.bz2). You can download the distribution from the OpenFOAM extensions project page at SourceForge.net.
Screenshot of FoamX, paraFoam and patchTool working together on Windows.FoamX is an easy-to-use, extensible and capable GUI case manager for a highly sophiscated open source CFD toolbox, OpenFOAM. This document describes how to port and run FoamX included in the Unofficial OpenFOAM Cygwin Port distribution on a Cygwin/Windows system. Readers are assumed to be familiar with OpenFOAM and basic operations of Cygwin.
Besides, the FoamX-20070224 (Feb. 24, 2007) release contains porting of other tools than FoamX whose porting work has remained to be done:
Currently there are two ways to run FoamX-cygwin; using binary distribution and building from source tree. For most peaple the binary distribution is recommended.
This port, like the Unofficial OpenFOAM Cygwin Port and the official version of OpenFOAM, is licensed under the GNU Public License, version 2.0 (or later). See the distribution files of the OpenFOAM for details.
For currently known other issues, see Troubleshooting and ToDo sections.
You don't need the mico-2.3.12 library package since it is statically linked into the binaries.
Before you start, be sure to make backup of your current OpenFOAM installation if you already have. Don't forget that this port is in beta state.
cd mkdir OpenFOAM cd OpenFOAM tar -xzf ../OpenFOAM-1.3.cygwin-src-0.5.tar.gz tar -xzf ../OpenFOAM-1.3.cygwin-bin-0.5.tar.gz tar -xzf ../OpenFOAM-1.3.Docs.tar.gz tar -jxf ../FoamX-cygwin-20070224.tar.bz2 mkdir cygwin cd cygwin tar -xzf ../../gcc-4.1.0.cygwin-OpenFOAM.tar.gz source ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc ~/OpenFOAM/OpenFOAM-1.3/postinstall.sh
mkdir -p $FOAM_RUN cp -r $FOAM_TUTORIALS $FOAM_RUN FoamX
Before you start, be sure to make backup of your current OpenFOAM installation if you already have. Don't forget that this port is in beta state.
In the following instructions $DIST_DIR stands for the directory where downloaded various distribution files reside. So you can copy-and-paste the command lines below to the shell session if you set DIST_DIR properly, for example
export DIST_DIR=~/download.
mv $WM_PROJECT_DIR/docs $WM_PROJECT_DIR/doc
cd $FOAM_SRC tar -zxf $DIST_DIR/mico-2.3.12.tar.gz mv mico mico-2.3.12
mv $FOAMX_PATH/C++/FoamXLib/DimensionSet.H \ $FOAMX_PATH/C++/FoamXLib/DimensionSet_.H rm $FOAMX_PATH/C++/FoamXLib/lnInclude/DimensionSet.H ln -s $FOAMX_PATH/C++/FoamXLib/DimensionSet_.H \ $FOAMX_PATH/C++/FoamXLib/lnInclude/DimensionSet_.H
cd $WM_PROJECT_DIR patch -p1 < $DIST_DIR/FoamX-cygwin-20070224.diff
exit (restart bash session) source ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc
cd $MICO_PATH ./configure --prefix=$MICO_ARCH_PATH --disable-shared --without-x make make install make distclean
cd $FOAMX_PATH ./Allwmake
cd $FOAM_APP/utilities/mesh/manipulation/patchTool/C++ ./Allwmake
cd $FOAM_APP/utilities/mesh/conversion wmake gmshToFoam
cd $FOAM_APP/utilities/miscellaneous wmake foamDebugSwitches
FoamX
Make sure you installed the openssh package.
If the error message says ``The Open Case operation failed due to getApplication::Invalid application class name ****'', this seems to be caused by the lack of config files in some of the solver directories. These solvers (boundaryFoam, dieselFoam, etc.) are not set up to run by FoamX and it is not a cygwin-specific behavior. See here for details.
Csh-alike shell support is still incomplete (it just barely launches FoamX and paraFoam) in this release but there is a simple workaround. First open a bash shell session and run the followings every time you open a csh session.
$ source ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc $ exec csh -l % FoamX
('$' and '%' each denotes the prompt of bash and csh respectively)
The current version of Java 3D (1.5.1) requires OpenGL 1.2 or DirectX9 compliant graphics driver. If your driver does not support OpenGL 1.2 but supports DirectX9 (which is quite unlikely though), Try adding a line
-Dj3d.rend=d3d
to the last part of ~/OpenFOAM/OpenFOAM-1.3/bin/patchTool so that it looks as follows.
"$jdkhome/bin/java" \ -cp "$jars" \ -DFoamX.SystemPath="$WM_PROJECT_DIR" \ -DFoamX.SystemConfigPath="$FOAMX_CONFIG" \ -DFoamX.UserConfigPath="$FOAMX_CONFIG" \ -DFoamX.PatchToolPath="$PATCHTOOL_PATH" \ -Duser.language=en \ -Dj3d.rend=d3d \ PatchTool/PatchTool $orbArgs $args
If neither of OpenGL nor DirectX9 works, try downgrading Java 3D to 1.3.2. The version works with either of OpenGL 1.1 or DirectX 8. In my test, under WindowsXP installed as a guest OS of VMware Player the patchTool only worked with OpenGL mode of Java3D 1.3.2.
Comments are welcome at this thread or this thread of OpenFOAM message board.