CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   FoamX binaries for CygwinWindows is now available (https://www.cfd-online.com/Forums/openfoam-installation/57560-foamx-binaries-cygwinwindows-now-available.html)

7islands November 11, 2006 01:16

As I mentioned earlier in the
 
As I mentioned earlier in the Preprocessing/FoamX board ( http://www.cfd-online.com/OpenFOAM_D...es/1/3287.html ), I've been doing a porting work of FoamX to Cygwin/Windows over the Unofficial OpenFOAM Cygwin Port. Now binary distribution is downloadable from the following URL.

http://www002.upp.so-net.ne.jp/ohshima/OpenFOAM/FoamX-cygwin/README-20061031.htm l

waynezw0618 November 30, 2006 01:02

HI Takuya: i have some questi
 
HI Takuya:
i have some question about installation of OpenFoam on cygwin. in my computer some tutorials of special application can not be open or creat new case of these application, for example cooles,boundaryFoam and so on. but no all. some of the application are quiet well for example IcoFoam.what is the problem?can you help me? thanks!

luca_g November 30, 2006 05:39

I think I've had the same prob
 
I think I've had the same problem and it is related to the fact that in cygwin filenames are not case sensitive.
Thus, if you look in folder OpenFOAM-1.3\.OpenFOAM-1.3\apps\FoamX\entries\dimensionedScalar
you will see for example a file c1.cfg and a file C1_.cfg

The underscore has been added in the cygwin port to differentiate the upper case file from the lower case one but if you look for example at the file ...entries\turbulenceModels\incompressible\kEpsilo nCoeffs.cfg you will see that it is still pointing to a file C1.cfg
In cygwin this actually means c1.cfg which is not the right one.
You should thus edit the kEpsilonCoeffs.cfg file to point to C1_.cfg

You will find that there are a few similar situations and several files to edit...

Then opening a case with FoamX should work fine.

waynezw0618 December 1, 2006 00:04

Hi Luca is there any rule or
 
Hi Luca
is there any rule or even patch file to make this change easy?

luca_g December 1, 2006 02:43

I've done it by hand; it is no
 
I've done it by hand; it is not a big number of files that you must edit.
Basically each time you get an error from FoamX you go and edit the file which is causing the problem.

7islands December 1, 2006 07:56

Hi wayng and Luca, Okay I u
 
Hi wayng and Luca,

Okay I understand the errors you are talking about. Probably what wayng states is "invalid application class name" which seems to be caused by the lack of a config file in the solver directory (http://www.cfd-online.com/OpenFOAM_D...es/1/1698.html) and which is not a cygwin-specific behavior. Anyway actually I haven't realized all those problems until now because I've run just two or three cases. I'll provide a patch for what Luca states if I can make it.

luca_g December 1, 2006 12:25

Dear Takuya, one further po
 
Dear Takuya,

one further point about your very interesting porting: until parafoam is not available it could be useful to include the foamToVTK dataconversion utility in the FoamX menu.
Infact, it seems to me that paraview 2.4.4 crashes when opening files generated with foamToEnsight but it works well with VTK files.
As you certainly know it is just a matter of including the FoamX folder with a foamToVTk.cfg file in the foamToVTK utility folder.

7islands December 2, 2006 04:21

Hi Luca, it sounds a good idea
 
Hi Luca, it sounds a good idea. I also experienced the same crash by foamToEnsight. I hope the native OpenFOAM reader module in the CVS version of paraview (http://www.cfd-online.com/OpenFOAM_D...es/1/3429.html) become usable soon (which still seems to have a little glitch).

waynezw0618 December 4, 2006 06:30

hi Luca: i have read all the
 
hi Luca:
i have read all the .cfg files of lesinterfoam in$Home/OpenFoam/OpenmFoam1.3/applications/solvers/Multiphase/lesinterfoam/FoamX / and sub folder.i do not find any similar situations.is there any other problems?
waiting for your help
thanks!

luca_g December 4, 2006 08:45

Dear Wayng, just follow the
 
Dear Wayng,

just follow the indications of the error message: it says "non-optional dictionary entry 'b'..." in "..FoamX/defaults/system/fvSolution::solvers".
So the problem is in the fvSolution.cfg file inside "..FoamX".
Infact, if you open the file you will see the following line:
include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/B.cfg";

If you check in the directory tree you will find that in the "..dictionaries/fvSolution/solvers" folder there actually is a "b.cfg" file (not the right one, we need the upper case) and a "B_.cfg" file.

So you need to edit the line to read like:

include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/B_.cfg";

Just do like this any time you find an error until it will work.

7islands December 12, 2006 07:44

Hi Cygwin users, I'm happy
 
Hi Cygwin users,

I'm happy to announce availability of the second version of FoamX-cygwin, FoamX-cygwin-20061212. Both source and binary distributions are available. Also, an update patch from the previous version, FoamX-cygwin-20061031, is available as there's no change in binary executables (just applying the patch will do). See the "Updating from the previous version" section in the following URL to update. I'd like to thank those who reported problems and gave suggestions as to the previous version.

The URL:
http://www002.upp.so-net.ne.jp/ohshima/OpenFOAM/FoamX-cygwin/README-20061212.htm l

What's new in FoamX-cygwin-20061212:
* Fix: FoamX doesn't allow to enter numbers in a non-English environment.
* Fix: Some tutorial cases refuse to open saying ``FoamXIOError "Non-optional dictionary entry '****' not found in dictionary ****::default"''.
* New: Now you can run FoamX in a csh (or tcsh) environment.
* New: Now you have the foamToVTK menu item in the FoamX right-click menu (Foam Utilities -> postProcessing -> dataConversion -> foamToVTK).
* Change: The binary distribution now includes iordump and nsadmin so that you can do some troubleshooting and administrative works (which is described in the section 5.1.1 of the User Guide).
* Change: The version of JDK which JAVA_HOME variable points to is updated to jdk1.5.0_10 from jdk1.5.0_09. If you'd like to continue to use jdk1.5.0_09, rewrite the JAVA_HOME line in $WM_PROJECT_DIR/.bashrc or .cshrc accordingly.

rsoule December 21, 2006 11:57

Hello, I am a total noob to
 
Hello,

I am a total noob to this I normaly deal with standard windows programs. I am having a hard time setting OpenFoam up under MS windows. I have followed the instructions but I am still having problems. Is it possable that some one could write a detailed step by step instalation procedure under MS Windows. If its too much trouble then I understand.

Thanks for the help
Ron

7islands December 22, 2006 19:36

Hello Ron, maybe you are makin
 
Hello Ron, maybe you are making easy things (at least if you are familiar with basic usage of Cygwin) a little too difficult. It's true it takes some time but is basically a matter of downloading and unpacking the distribution files.

1. Downlaod and install the default Cygwin packages plus sed, make, cygutils and openssh packages using http://cygwin.com/setup.exe.

2. Download and install JDK 5.0 Update 10 which is available at http://java.sun.com/javase/downloads/index_jdk5.jsp with the default settings.

3. Download
OpenFOAM-1.3.cygwin-src-0.5.tar.gz
OpenFOAM-1.3.cygwin-bin-0.5.tar.gz
OpenFOAM-1.3.Docs.tar.gz
gcc-4.1.0.cygwin-OpenFOAM.tar.gz
from http://dpdx.net/openfoam-cygwin/ and
FoamX-cygwin-20061212.tar.bz2
from http://www002.upp.so-net.ne.jp/ohshima/OpenFOAM/FoamX-cygwin/README-20061212.htm l
into your home directory.

4. Issue the following commands from a Cygwin terminal.<pre> 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-20061212.tar.bz2
mkdir cygwin
cd cygwin
tar -xzf ../../gcc-4.1.0.cygwin-OpenFOAM.tar.gz
cd
source ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc
~/OpenFOAM/OpenFOAM-1.3/postinstall.sh</pre>
5. If you want to start tutorials, do so by typing the followings.<pre> mkdir -p $FOAM_RUN
cp -r $FOAM_TUTORIALS $FOAM_RUN
FoamX</pre>

rsoule January 2, 2007 17:22

Thanks for the help. Your exp
 
Thanks for the help. Your explanation helped but now I have new problems. Could you explaine the last and second to last line? And where should all the files be installed in the root C:/OpenFOAM drive? And the last question, it is looking for the path /usr/java/jdk1.4, Java dosen't install here, how is this fixed?

Thanks for the help
Ron

7islands January 2, 2007 19:37

1. Explanation of step 4: Typ
 
1. Explanation of step 4:
Typing "cd" without argument (the first and eleventh line) takes you to your home directory (C:\cygwin\home\Ron or somewhere depending on your login name) and the "~" characters in the last two lines stand for your home directory. Just like the linux version of OpenFOAM you should install all the files to the OpenFOAM directory under your home directory (~/OpenFOAM), not under the root directory (C:\OpenFOAM). And beware that the order of unpacking the distribution fies matters; FoamX-cygwin-20061212.tar.bz2 must be unpacked after the other three OpenFOAM-1.3.* files have been unpacked.

2. Java path problem:
It usually should not happen so could you fix the above first and try again? If it does happen again could you give me some more details (as to what you did and what you get).

rsoule January 3, 2007 10:54

Again thanks for the help. I
 
Again thanks for the help. I created the OpenFOAM directory in the following loacation (is this right). That is the home directory cygwin creates:

C:\Documents and Settings\rsoule1\

I followed you directions in the order given. When I try to run the "source ~/OpenFoam..." line i get the following error:

bash: [: too many arguments
bash: [: too many arguments

Thanks for the help
Ron

7islands January 4, 2007 06:23

Usually the Cygwin setup progr
 
Usually the Cygwin setup program configures the home directory to be under C:\cygwin\home, but on occasion it seems to misconfigure it to be under C:\Documents and Settings just like your unfortunate case. Apparently OpenFOAM (including its initialization scripts) is not meant to be run under directory structure which contains whitespace in its pathname (such as "C:\Documents and Settings"), that might be the cause of the error (although I can't conclude). So could you try fixing the home directory carefully following the "Cygwin installing into wrong directory" thread in http://www.cygwin.com/ml/cygwin/2006...ads.html#00999 .

I hope all these things won't tire you out to give up http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

liamm February 6, 2007 16:31

Thanks for posting the instruc
 
Thanks for posting the instructions as i was getting stuck with the windows install, however after following your instructions i'm still having a few problems that i hope someone can help me with.
After I type the last line ~/OpenFOAM/OpenFOAM-1.3/postinstall.sh I get the responce ":set WM_PROJECT_DIR and FOAMX_PATH" then when i type FoamX to open foamx it replies "bash: FoamX: Command not found" does anyone know what the problem is?

Thanks for yor help
Liam

7islands February 6, 2007 19:03

Hi, To run postinstall.sh WM_
 
Hi,
To run postinstall.sh WM_PROJECT_DIR and FOAMX_PATH environment variables must be correctly set, which is done by running "source ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc". Are you sure to have run before running postinstall.sh?

If you are sure what message did you get?

Takuya

liamm February 7, 2007 07:03

Thanks for the fast reply. ber
 
Thanks for the fast reply. berore i run postinstall.sh i am running
source ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc and the reply i get is
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3: is a directory.

7islands February 7, 2007 08:04

Hi, Sorry for a silly questio
 
Hi,
Sorry for a silly question but is there any chance that you have an unintended whitespace between "source ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3" and "/bashrc" ...??

Anyway the message indicates that ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc was not executed properly but no possible reason other than that comes to me.

Takuya

liamm February 7, 2007 11:28

No there isn't but there is wh
 
No there isn't but there is whitespace in my username if that makes a difference, i will clear everything and restart, maybe i did something wrong along the way and i don't realise it.
Thanks for the help
Liam

liamm February 7, 2007 21:00

It was the whitespace in my wi
 
It was the whitespace in my windows user name and once i changed my home file in cygwin it worked.

However i now have a new problem i have set my ~/.bashrc so cygwin automatically loads ~/openfoam/openfoam-1.3/.openfoam-1.3/bashrc the message "FOAM install not found" showed up so i changed my ~/openfoam/openfoam-1.3/.openfoam-1.3/bashrc file to make it work but nothing i did worked. once i solved that problem a number of others popped up.

i was just wondering if i needed to change any of the names of my install directery "export WM_PROJECT_INST_DIR=$HOME/$WM_PROJECT" do i need to change "$home/" to "~/" or "home/liam/" or should it be working the way it is.

Thanks
Liam

7islands February 8, 2007 19:08

Hi, Generally you don't have
 
Hi,
Generally you don't have to touch any of the shell scripts; they are supposed to work out-of-box if you followed the default installation procedure of cygwin. My one suspicion is that the HOME environment variable went inconsistent with your actual installation for some reason.

Takuya

7islands February 24, 2007 09:40

Hi Cygwin users, I am prepari
 
Hi Cygwin users,
I am preparing for a new release of FoamX-cygwin shortly. This time the porting work won't be limited to FoamX. The next release will have the following features, aiming for wiping out all the undone porting works I ever know.

Is there anything else to do, which is supposed to be resolved in a short time? If anyone noticed remaining works, please let me know. As OF 1.4 also seems to be coming shortly, and I'm getting gradually busy, I'd like to make this the final release for OF 1.3.

Changes since FoamX-cygwin-20061212:
* New: paraFoam porting by way of the native OpenFOAM reader introduced in ParaView 2.6.
* New: patchTool porting.
* New: gmshToFoam now have compatibility with .msh files generated by Windows versions of Gmsh.
* New: foamDebugSwitches porting.
* Change: The version of JDK to which JAVA_HOME variable points is updated to jdk1.6.0.

Problems which will remain unresolved:
* Csh-alike shell support will be still incomplete.
* Installing FoamX-cygwin under a directory structure which contains whitespace in its pathnames will remain supported. Yes, I know that this is causing so many problems, and fixing it won't be technically so difficult, but requires too much testing work and time for me.

7islands February 27, 2007 04:27

Hi Cygwin users, This is the
 
Hi Cygwin users,
This is the announcement of the third revision of FoamX-cygwin, FoamX-cygwin-20070224. Source and binary distributions are available. This time the porting work is not limited to FoamX itself. Most notable will be paraFoam porting by way of the native OpenFOAM reader introduced in ParaView 2.6. You can now launch paraFoam from both of command line and Foam Utilities -> postProcessing -> graphics -> paraFoam.

The URL:
http://oshima.eng.niigata-u.ac.jp/Op...-20070224.html

Changes since FoamX-cygwin-20061212:
* New: paraFoam porting by way of the native OpenFOAM reader introduced in ParaView 2.6. You need ParaView 2.6 (http://www.paraview.org/) to run paraFoam (Install it with default settings).
* New: patchTool porting. You need Java 3D (https://java3d.dev.java.net/) to run patchTool (Follow the installation instruction of Java 3D).
* New: gmshToFoam now have compatibility with .msh files generated by Windows versions of Gmsh.
* New: foamDebugSwitches porting.
* Change: The version of JDK to which JAVA_HOME variable points is updated to jdk1.6.0 from jdk1.5.0_10. If you'd like to use other versions, modify the JAVA_HOME line in $WM_PROJECT_DIR/.bashrc or .cshrc accordingly.

Known problems:
* Csh-alike shell support is still incomplete (just barely launches FoamX and paraFoam).
* Installing FoamX-cygwin under a directory structure which contains whitespace in its pathnames is not supported.

marziolettich March 14, 2007 10:03

generally, paraFoam works very
 
generally, paraFoam works very well with Cygwin, thanks to the excellent work of Takuya Oshima. But in a particular case I got this error message:


Generic Warning: In C:\dev\ParaView26\VTK\Rendering\vtkTkRenderWidget. cxx, line 626
A TkRenderWidget is being destroyed before it associated vtkRenderWindow is destroyed.This is very bad and usually due to the order in which objects are being destroyed.Always destroy the vtkRenderWindow before destroying the user interface components.


ERROR: In C:\dev\ParaView26\GUI\Widgets\vtkKWTkUtilities.cxx , line 221
vtkPVApplication (03DBCD30):
Script:
toplevel .1710 -class {ParaView} -visual best -highlightthickness 0
Returned Error on line 1:
this isn't a Tk applicationunable to create widget ".1710"
Stack trace:
this isn't a Tk applicationunable to create widget ".1710"
while executing
"toplevel .1710 -class {ParaView} -visual best -highlightthickness 0"



ErrorMessage
# Error or warning: There was a VTK Error in file: C:\dev\ParaView26\GUI\Widgets\vtkKWTkUtilities.cxx (221)
vtkPVApplication (03DBCD30):
Script:
toplevel .1710 -class {ParaView} -visual best -highlightthickness 0
Returned Error on line 1:
this isn't a Tk applicationunable to create widget ".1710"
Stack trace:
this isn't a Tk applicationunable to create widget ".1710"
while executing
"toplevel .1710 -class {ParaView} -visual best -highlightthickness 0"

This is quite strange, as it's a very simple 2d example and I don't know what could be that cause this crash. If someone experienced something similar, please post a reply here. Thanks!

7islands March 14, 2007 20:49

Hi Marzio, Actually I'm also
 
Hi Marzio,
Actually I'm also having similar crashes especially when reading unstructured meshes even if they are
simple 2D ones (the tutorials/potentialFoam/cylinder case for example). My guess is that the ParaView OpenFoam reader code still has some works to be done, because ParaView also crashes even if such a case is read through the File menu of ParaView (not through the paraFoam script). I've been looking into the reader code when I have time but so far I have no success with it.

Terry Jordan, the writer of the nice reader code, might be able to propose some fix if you report the case in detail at the following "OpenFOAM reader in the ParaView CVS" thread:
http://www.cfd-online.com/OpenFOAM_D...es/1/3429.html

Takuya


All times are GMT -4. The time now is 01:17.