Hi Foam World...
What can
Hi Foam World...
What can I do to have CFD quantities in MayaVi? I can successfully create a VTK export... and i can open it in MayaVi... but inside Mayavi there is nothing that i can do to let me access CFD quantitites... and the same thing happens with a VTK export in VisIt... Is there something that i should do with the VTK files prior to trying to pen them In MayaVi or VisIt...? Best Regards Alex |
foamToVTK outputs 'UNSTRUCTURE
foamToVTK outputs 'UNSTRUCTURED_GRID' data with 'FIELD attributes' (run foamToVTK with -ascii). How does Mayavi/Visit want the vtk format?
|
Hi Mattijs...
I have done s
Hi Mattijs...
I have done so... root@iskandhar:~# foamToVTK . simpleV33M_HS5c -ascii It creates a folder ~/OpenFOAM/root-1.4.1/run/simpleV33M_HS5c/VTK I try to open in Mayavi one of the time files of the VTK database, say simpleV33M_HS5c_320.vtk, but i do not know how to access CFD qantities, (scalars, vectors...) I configure the VTK reader to access colorScalars, Fields, Normals, Scalars, TCoords, Tensors and Vectors - should be enough to grasp the data in VTK database - but when i try to configure an isosurface module, it says that there is no scalar data to contour... there shuld be at least three scalar quantities in a simpleFoam simulation... pressure epsilon and k... according to Paraview these quantities are there... how to make them appear in mayavi...? Thanks in Advance Alex |
Sorry, I don't run MayaVi/Visi
Sorry, I don't run MayaVi/Visit. If you think it is the format of vtk we output tell me what to change. See www.vtk.org/pdf/file-formats.pdf. Generate e.g. a 1x1x1 cell cavity and run foamToVTK with the -ascii option to see how we currently are outputting fields.
|
Hi Mattijs
Sorry for not re
Hi Mattijs
Sorry for not replying sooner, had some hard stuff to do in the lab... well here it is: I have run the cavity tutorial with just 4 cells in blockMeshDict in icoFoam folder, and made a vtk output with the following command : foamToVTK ./tutorials/icoFoam cavity -surfaceFields -ascii -allPatches -fields "(U p)" -time 5 The Output is here... # vtk DataFile Version 2.0 cavity ASCII DATASET UNSTRUCTURED_GRID POINTS 18 float 0 0 0 0.05 0 0 0.1 0 0 0 0.05 0 0.05 0.05 0 0.1 0.05 0 0 0.1 0 0.05 0.1 0 0.1 0.1 0 0 0 0.01 0.05 0 0.01 0.1 0 0.01 0 0.05 0.01 0.05 0.05 0.01 0.1 0.05 0.01 0 0.1 0.01 0.05 0.1 0.01 0.1 0.1 0.01 CELLS 4 36 8 1 10 13 4 0 9 12 3 8 4 5 14 13 1 2 11 10 8 4 13 16 7 3 12 15 6 8 7 8 17 16 4 5 14 13 CELL_TYPES 4 12 12 12 12 CELL_DATA 4 FIELD attributes 3 cellID 1 4 int 0 1 2 3 p 1 4 float 2.32671e-09 0.184773 -0.162071 0.346843 U 3 4 float -0.0726998 0.0621648 0 -0.0580389 -0.0721513 0 0.124485 0.0721513 0 0.139146 -0.0621648 0 POINT_DATA 18 FIELD attributes 2 p 1 18 float 2.32671e-09 0.0923865 0.184773 -0.0810355 0.0923863 0.265808 -0.162071 0.092386 0.346843 2.32671e-09 0.0923865 0.184773 -0.0810355 0.0923863 0.265808 -0.162071 0.092386 0.346843 U 3 18 float 0 0 0 0 0 0 0 0 0 0 0 0 0.0332231 1.7808e-17 0 0 0 0 0.5 0 0 1 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0332231 1.7808e-17 0 0 0 0 0.5 0 0 1 0 0 0.5 0 0 I guess that i do need to learn how to use mayavi... The output is allright, isnt it? Alex |
Hi Again...
Could it be tha
Hi Again...
Could it be that mayavi doesn't support unstructured data...? I have this example /usr/share/docs/mayavi/example/heart.vtk that displays well in mayavi, allowing me to select the filters and postprocess, but i %cat /usr/share/docs/mayavi/example/heart.vtk and the header is # vtk DataFile Version 2.0 CT scan data of human heart, courtesy by Henk Mastenbroek RuG ASCII DATASET STRUCTURED_POINTS DIMENSIONS 32 32 12 ORIGIN 0.000 0.000 0.000 SPACING 1.000 1.000 4.000 POINT_DATA 12288 SCALARS scalars float LOOKUP_TABLE default ... A bit different from Foam Output format... ... can this be the problem...? Alex |
BTW, foamToVTK outputs vtk for
BTW, foamToVTK outputs vtk format correctly to paraview...
...paraview VTK reader can access the data in VTK output... ... So i guess that the issue is with mayavi VTK reader format... Alex |
hi alex
I can not use the p
hi alex
I can not use the paraFoam command correctly on my macintosh. so i want to use this command of foamToVTK...i understand the command you have given above but can you tell me what do the arguments after the casename specify..... please help. thanx |
Hi Gupta,
I think... ( not
Hi Gupta,
I think... ( not with my linux box now...) the correct syntax is: %foamToVTK <mycasedir> <mycase> -ascii -time <time> -allPatches (not sure about this) but i am sure about %foamToVTK <mycasedir> <mycase> -ascii -time <time> That should create a VTK folder inside <mycase> with a selection of scalarFields and vectorFields sampled in <time> in ascii format. Anyway, i wouldnt advise you to use Mayavi... it has difficulties reading unstructured meshes... I never got to use Mayavi... but VTK exports of foamToVTK read well in paraview... If you should have any difficulties, just type foamToVTK in shell... it should give you all the syntax flags. Alex |
thanx alex i tried it....and i
thanx alex i tried it....and it works....
as i could not view anything in paraview after executing the command although they did not show any errors or warning. so i got into another confusion, i first executed the blockMesh and then the checkMesh but after that when i run foamToVTK, i get a folder created as you say alex but if i open this folder with paraview, i can see nothing. am i following the wrong path? i m still trying to succeed in visualizing cavity case. i know this would be silly for u efficient foamers but i have just installed it for the first time, so please bear with me. thanx in advance. |
hi again alex,
I have a que
hi again alex,
I have a query. as i m trying to solve drag and lift on a 2D airfoil. i need these directories but they are not available in my version of openfoam. hence, what to do? especially when the postprocessing directory is missing in the src directory and also the liftdrag directory in the utilities. can anybody help? I am using openfoam-1.4.1. and i do not have any previous versions of openfoam. also i checked the following forums already http://www.cfd-online.com/OpenFOAM_D...tml?1216629859 |
Hi again,
As to yr first qu
Hi again,
As to yr first question, the VTK folder SHOULD ( unless your OpenFOAM is not properly intslled ) have this : 1.A VTK file database of the CFD domain 2D or 3D mesh with all the associated CFD quantities, scalarFields, vectorFields and tensorFields, consisting ot all the time slices of your case ( or the specific time slice if you used the -time flag ) 2.Several folders, one for each patch ( boundary in FOAMese ), bearing the name of the patch it reports to, containing a VTK file database of the associated CFD quantities pertaining to each patch, in an ordered set of timeslices. Your problem, maybe, is that when you open the VTK database, you should select which kind of rendering mode do you want in paraview... wireframe, volume, ... there are at least 4 options there... but ( my guess again ) if you did not run your case yet quote: "...and then the checkMesh but after that when i run foamToVTK, i get a folder created as you say alex but if i open this folder with paraview, i can see nothing..."... You do not yet have scalars, or vectors in your database to be queried... I take that you proceeded to foamToVTK AFTER checkMesh WITHOUT first performing a CFD calculation with say, %icoFoam . cavity for instance... Am i wrong here...? If i am right, there is NOTHING you will do in paraview that will present CFD quantities, simply because they do not yet exist in the VTK database that you create with foamToVTK . cavity <whatever> after checkMesh . cavity...! Get the point here... ? As to you second question, check http://www.cfd-online.com/OpenFOAM_D...es/1/1604.html, and download and compile ( i take it you know how to do it... % cd .../src/.../myUtil % ./wmake % ./wclean ) Best regards Alex |
yeah u r right.
i proceeded w
yeah u r right.
i proceeded without icoFoam neways regarding my first question. the lift and drag cases r not in my version. I have written a code for solving them but when i try and add it to the utilities in application, i get the error, the openfoam-1.4.1 can not be modified. also i think if u r using 1.4.1 u shuld check u wuld not be having these commands liftDrag let me know if u succeed with them |
Hi again...
I had my laptop
Hi again...
I had my laptop to repair last week, but i have an old PC at home, running FC4 x64, i will install and build the liftDrag utility over OpenFOAM-1.4.1 tomorrow... I will give you the details of how to do it... since, i do no fix these things, just do it on the spot... :-) BTW which distro do you use...? Should be no prob anyway... is your foamInstallationTest ok...? Should be... proper environment settings are crucial to compile new apps... Alex |
thanx alex.
I use a macinto
thanx alex.
I use a macintosh and a disk image of the software. It would be a gr8 help |
Hi Mayank...
Didn't have ti
Hi Mayank...
Didn't have time to install ( compile ) liftDrag for OF-1.4.1... but check this... http://www.cfd-online.com/OpenFOAM_D...tml?1208496888 Download liftDragTool.. extract, and follow the instructions in the README... That should be enough... never used OpenFOAM as an image... and i am not very familiar with image disks in Macintosh... so i do not know if there are any quirks about compiling or installing stuff in an emulated OS... But i guess this should be enough.. at least in VMware there are no probs... with Paralels ( if that's what u use ), i just dunno... Alex |
thanx alex a lot for ur time a
thanx alex a lot for ur time and info..
I have it installed at macintosh for my personal purpose. But i am doing n internship in Czech and have to install it on linux over there. i tried to install it but i keep coming across problems earlier when i installed, it actually sourced the files properly but not when i m trying to install it again it says no such file or directory while sourcing it. also, previously i had followed the instructions on a forum here and i followed everything here and cross-checked my results with the persons, everything was same but blockMesh command failed to execute. the only difference in my installation and the one by the person was inability to connect to ssh or rsh. is it because of that? and can u tell me how to solve this problem? or could it be because i m the only linux user in the entire network? it has been 3 weeks since i m trying to install OpenFOAM1.4 on linux Ubuntu 8.04 64 bit and desperately need some help. sorry, the message is really long but please help. i m trying to compile on linux and not install |
and yes the link really helped
and yes the link really helped....
|
Hi Mayank
In LINUX, i would
Hi Mayank
In LINUX, i would know how to help... % yum install rsh-server, for Red Hats, Fedoras, CentOS's, SL's etc ( rpm based distros ) or % apt-get install ssh for Ubuntus, or Debians You only need ONE of them, rsh OR ssh... not both... But as for Mac's I do not know what the heck is ssh in "Mac'ese"... :-) Alex |
Hi Alex!
ssh is ssh on Mac.
Hi Alex!
ssh is ssh on Mac. And it comes with the system Bernhard |
Hi Bernhard
Thanks for the
Hi Bernhard
Thanks for the info... :-) NEVER used Mac in my whole life... Started with windshit... soon got tired of "The Blue screens of Death", and shifted to Linux, RedHat, Fedora, Suse, and now Ubuntu... Are there any interesting Mechanical Engineering apps ported to Mac...? CAD, FEA, CFD,... generic...? As i never heard about any, i chose linux when i ran away from smart MS Billy Gilly... Is Mac worth what it costs...? for an Engineer...? Alex |
yeah regarding 2D CAD Qcad is
yeah regarding 2D CAD Qcad is good and I am working on it. it is pretty similar to AutoCAD. With linux I tried the cmmand u r tellling to install ssh but i get an error. I can try 2moro in the office and let u know. Also, any idea y the same version is not being sourced correctly where as it was being sourced correctly before.
thanx alex and bernard can u tell me how to add liftdrag utility in Mac openfoam-1.4 |
hi again alex,
when i tri
hi again alex,
when i tried to install ssh... i got the following error coudl not connect to security.ubuntu.com:80 unable to feth some archives. then i tried installing 1.5 i get the following error wheni source the environment.. bash:~/............./apps/bin/foamcleanpath:no such file or directory... bash:~/.................../apps.paraview:no such file or directory there r atleast 8 such lines (as i have to switch to windows to write this email i cant copy the console. thanx |
Hi Mayank
OpenFOAM 1.5 shou
Hi Mayank
OpenFOAM 1.5 should be installed in a folder called OpenFOAM in /root: place OpenFOAM-1.5.General.gtgz, OpenFOAM-1.5.linuxGccDPOpt.gtgz, ThirdParty.General.gtgz, ThirdParty.linuxGcc.gtgz in /root/OpenFOAM ( i take it you are ROOT in yr machine... ) extract all folders... % tar xzvf OpenFOAM-1.5.General.gtgz % tar xzvf OpenFOAM-1.5.linuxGccDPOpt.gtgz % tar xzvf ThirdParty.General.gtgz % tar xzvf ThirdParty.linuxGcc.gtgz % rm * So now you should have /root/OpenFOAM/OpenFOAM_1.5 and /root/OpenFOAM/ThirdParty % cd ~ ( back to root dir ) % gedit .bashrc ( edit init files od bash...) write this at the beginning of .bashrc : # OpenFOAM init configuration . $HOME/OpenFOAM/OpenFOAM-1.5/.OpenFOAM-1.5/bashrc ... save and exit. in bash, write % . $HOME/.bashrc set the tutorials files... % mkdir -p $HOME/OpenFOAM/${LOGNAME}-1.5/run % cp -r $WM_PROJECT_DIR/tutorials $HOME/OpenFOAM/${LOGNAME}-1.5/run test it... % cd $HOME/OpenFOAM/${LOGNAME)-1.5/run/tutorials/icoFoam % blockMesh . cavity % icoFoam . cavity % foamToVTK . cavity Open paraview independently of paraFoam, access the VTK database created in /root/OpenFOAM/root-1.5/run/tutorials/icoFoam/cavity/VTK... and have fun... :-) This should do... Alex |
About rsh or ssh,
Search fo
About rsh or ssh,
Search for them in synaptic, if you have the repositories enabled... or type in a shell % sudo -i % <passwd> % apt-get install ssh or % apt-get install rsh-client % apt-get install rsh-server ... guess this is it... brgds Alex |
hi,
i m getting the followi
hi,
i m getting the following error when i try foamToVTK for the shckTube example in sonicFoam on my macintosh in OpenFOAM-1.4.1 --> FOAM FATAL IO ERROR : wrong token type - expected Scalar found on line 27 the word 'nan' file: /Users/mayankgupta/openfoam/mayank/run/sonicFoam/shockTube/0.001/U::internalFiel d at line 27. From function operator>>(Istream&, Scalar&) in file lnInclude/Scalar.C at line 85. can some one help me with this. |
tried installing with ur sugge
tried installing with ur suggestion. Atleast i made some progress, the blcoMesh command is executed but with the following error
Wrong number of arguments, expected 0 found 2 ****i put the sourcing line at the end of .bashrc (as mentioned in the README) but u had mentioned to do at the beginning (if i have to put it there, let me know) also, after sourcing i do not see the following lines at the beginning of the terminal Executing:.........../.bashrc Executing:............./apps/ensightFoam/bashrc Executing:............../apps/paraview/bashrc these lines are visible when i source it on my macintosh |
hi again,
I edit the messag
hi again,
I edit the message at the top and tried, it gave me the same error. also, if i edit your line it says, no such file or directory but if i edit . $HOME/OpenFOAM/OpenFOAM-1.5/etc/bashrc it allows me to execute blockMesh with the above error. and yes, i have been unable to install rsh or ssh when i try doing that, i get the error could not connect to security.ubuntu.com:80 (91.189.88.46) |
frpelikan@Techn-028:~/OpenFOAM
frpelikan@Techn-028:~/OpenFOAM/mayank/tutorials/icoFoam$ blockMesh . cavity
bash: /home/frpelikan/OpenFOAM/OpenFOAM-1.4/applications/bin/linuxGcc4DPOpt/blockMesh: No such file or directory frpelikan@Techn-028:~/OpenFOAM/mayank/tutorials/icoFoam$ I get this error when i run blockMesh . cavity on OPenFOAM-1.4 |
Hi Mayank
Seems that yr Mac
Hi Mayank
Seems that yr Mac installation is correct... But to mesh a domain you should try %blockMesh <casedir> <case> if u are already in caseDir, do %blockMesh . <case> About the NaN... well, as a much respected person in the CFD world once said... : "... NaNs are good only if you are in an Indian restaurant, not in CFD..." :-D shockTube requires a set of carefully chosen parameters to converge... that is a more complicated issue than the one you are trying to solve now... Has to do with parameters in your fvSchemes, fvSolution and controlDict files which are in .../shockTube/system directory, requires some knowledge on the numerics of solving the Euler and Navier-Stokes equations, conditions of numeric stability and convergence... What sonicFoam states is that in cannot progress from time step 0.001 because when it tries to read one of the scalar ( --> FOAM FATAL IO ERROR : wrong token type - expected Scalar found on line 27 the word 'nan' ) components of vector field velocity ( .../shockTube/0.001/U ) , it does not find a number (NaN, Not a Number ) so.. first things first :-) Good sign is that your environment variables are properly set, otherwise bash wouldn't "know" what is blockMesh or sonicFoam... About rsh or ssh... have you enabled Ubuntu DVD as a software source ? Do you have an active web connection in Ubuntu OS...? ...it complaints it cannot find what it is looking for... Alex |
...Hi again...
In yr Mac in
...Hi again...
In yr Mac installation, you could try to solve ( mesh, solve and postprocess ) a "gentle" case like cavity in icoFoam... Since your environment vars are properly sourced... it should be ok... ...about /root/.bashrc : You can put the initialization of OpenFOAM variables anywhere inside that file, provided that : 1. You do not put it inside an <if> construct, 2. You respect the path to root/OpenFOAM/OpenFOAM-<version>/.OpenFOAM-<version>/bashrc, if you are root, or /home/<who-you-are>/OpenFOAM/OpenFOAM-<version>/.OpenFOAM-<version>/bashrc, if you are a normal unprevileged user. Alex |
thanx for your patience once a
thanx for your patience once again.
yeah i have an active internet connection on my linux and it is update with the latest packages. Also, ssh is installed ow and my company has removed all firewall and proxy protections for me. With OpenFOAM-1.5 if i am able to run blockMesh . cavity command, y cant I see the environment settings at the beginning of the terminal. is it a property of the new version. And y such an error. It makes no sense as I m giving 2 arguments . & cavity after blockMesh. coming to OpenFOAM-1.4, it is giving me an error no such directory or file where as i tracked the path and the file is there. Also my system check says my connection is now comaptible and ssh is connected thanx. |
Warning in /home/frpelikan/Ope
Warning in /home/frpelikan/OpenFOAM/OpenFOAM-1.5/etc/settings.sh:
Cannot find /home/frpelikan/OpenFOAM/linux/gcc-4.1.2-64 installation. Please install this compiler version or if you wish to use the system compiler, change the WM_COMPILER_INST setting to 'System' in this file I have this new error while compiling OpenFOAM-1.5/. can anyone advice a newbie to sort this out. I went to the corresponding file and did the same but when i run blockMesh . cavity, i get this error Usage: blockMesh [-region region name] [-case dir] [-blockTopology] [-help] [-doc] [-srcDoc] Wrong number of arguments, expected 0 found 2 and when i run it without arguments, i get this error file: /home/frpelikan/OpenFOAM/mayank/run/tutorials/icoFoam/system/controlDict at line 0. From function regIOobject::readStream(const word&) in file db/regIOobject/regIOobjectRead.C at line 66. FOAM exiting can sum1 help please.i m a newbie to this. thanx in advance |
hi alex,
WARNING: Conflict
hi alex,
WARNING: Conflicting installations: OpenFOAM settings : /bin/gcc current path : /usr/bin/gcc CRITICAL ERROR this is an error i m getting when i run foamInstallationTest. i have removed the error due to rsh/ssh. my ssh connection is working now. I am unable to figure this out in the settings direectory. I could not find the line where i could change the path. can u help me here. I think everything else has been fixed. I m probably getting the above error due to this fault i guess. Please bear with me. |
thanx alex for ur patience and
thanx alex for ur patience and advice. my istallation is ok now. And i can run some commands. I shall contact u soon when i get stuck again.
thanx again |
Hi Mayank
:-D Been away for
Hi Mayank
:-D Been away for all last weekend... Back to the labs today... Good to know you solved it... Alex |
hi alex,
i m confused now
hi alex,
i m confused now really. I made a blockMeshDict file which was giving me a good mesh today early but after one hour the same file was generating the following error Creating blocks #0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/frpelikan/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigSegv::sigSegvHandler(int) in "/home/frpelikan/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #2 ?? in "/lib/libc.so.6" #3 Foam::block::blockPoints() in "/home/frpelikan/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMes h" #4 Foam::block::block(Foam::blockDescriptor const&) in "/home/frpelikan/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMes h" #5 Foam::blockMesh::createTopology(Foam::IOdictionary &) in "/home/frpelikan/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMes h" #6 Foam::blockMesh::blockMesh(Foam::IOdictionary&) in "/home/frpelikan/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMes h" #7 main in "/home/frpelikan/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMes h" #8 __libc_start_main in "/lib/libc.so.6" #9 __gxx_personality_v0 in "/home/frpelikan/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/blockMes h" Segmentation fault whats wrong ti was working fine an hour ago. Also i m putting my blockMeshDict with it convertToMeters 0.001; vertices ( (0 0 0) (117.51 53.7 0) (-100 100 0) (-100 0 0) (0 0 1) (117.51 53.7 1) (-100 100 1) (-100 0 1) ); blocks ( hex (0 1 3 4 5 6 7) (10 10 1) simpleGrading (1 1 1) ); edges ( ); patches ( wall fixedWalls ( (0 1 2 3) (0 1 5 4) (0 3 7 4) (1 2 6 5) (2 3 7 6) (4 5 6 7) ) ); mergePatchPairs ( ); |
thanx man i solved it.
it was
thanx man i solved it.
it was a mistake in my code. |
hi alex,
I get the followin
hi alex,
I get the following error when i want to define n edge Expected a '(' while reading VectorSpace<form,>, found on line 40 the doubleScalar 0.00256 file: /home/frpelikan/OpenFOAM/mayank/tutorials/icoFoam/check/constant/polyMesh/blockM eshDict::edges at line 40. From function Istream::readBegin(const char*) in file db/IOstreams/IOstreams/Istream.C at line 94. i found this file and want to try the solution posted at this forum http://www.cfd-online.com/OpenFOAM_D...es/1/3223.html but problem arises due to my limited knowledge in linux i do not know how to do it can u guide me? |
but when i m using polyLine i
but when i m using polyLine i dont get the error, it is kind of silly.
and although polyLine works good but i m really doubtful about the accuracy of the curvature. kindly let me know how to debug the spline and arc error |
All times are GMT -4. The time now is 03:11. |