CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

some basic problems, little help needed

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2010, 12:50
Default some basic problems, little help needed
  #1
New Member
 
Jakub
Join Date: Oct 2010
Posts: 12
Rep Power: 15
btgyd is on a distinguished road
Can you do please provide me the correct order of commands for tutorial cases of ,,motorbike" and ,,nacaAirfoil".

I know that in order to run ,,cavity case" I should change direction in ternminal to cavity folder, then run ,,blockMesh" command, then ,,icoFoam" and finally ,,paraFoam" to post-process... but when ot comes to ,,motorbike" case i don't know which commands to use.

Ok, so when I change direction to motorbike folder, then I type ,,blockMesh" in order to generate... hmm... some mesh, but in the folder I can see that there's also a file describinb a mesh of motorbike in snappyHexDic, so I think, that I should run now ,,snappyHexMesh" and that the code of the program would figure something out of it, but I get an info that there's a fatal error, //////////////////

*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.1-fffd2c682d50
Exec : snappyHexMesh
Date : Oct 31 2010
Time : 18:41:38
Host : ubuntu
PID : 2155
Case : /home/btgyachtdesign/OpenFOAM/btgyachtdesign-1.7.1/run/tutorials/incompressible/simpleFoam/motorBike
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0



--> FOAM FATAL IO ERROR:
cannot open file

file: /home/btgyachtdesign/OpenFOAM/btgyachtdesign-1.7.1/run/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 61.

FOAM exiting

/////////////////////

where's my mistake? How to solve this problem? What am I doing wrong?

What is more, the motorcase is most interesting for me to understand, since I want to use openFoam to design opitmised sails and bulbs/keels. I want to make a virtual wind/hydro tunnel to investigate diffirent cases. I know that a lot of work to do is ahead, but I still want to figure out how to work with openFoam.

I would be honoured if you could spend this few seconds and share the commands being used in those cases. That would be very helpful.

Kind Regards,

Kuba
btgyd is offline   Reply With Quote

Old   October 31, 2010, 13:34
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Kuba and welcome to the forum!

It's quite simple: in the tutorial folders, always look for the scripts Allrun and Allclean. They are either in the tutorial case folder, or in the parent folder. Only when there isn't one, you then can simply run blockMesh and the solver whose name is given to the parent folder.

To run either one of the scripts (when they exist) run like so for running the case:
Code:
./Allrun
When you want to clean up the case (to save space or start over), run:
Code:
./Allclean
Edit: I almost forgot about some other two commands that might be useful:
  • The generic case runner:
    Code:
    foamRunTutorials
    Run it when you're inside a tutorial case folder, or in one of the parent folders of the desired tutorials. It will run them all, according to the description I've given before.
  • The generic case cleaner:
    Code:
    foamCleanTutorials
    This is the counter part of the previous command

Best regards and good luck!
Bruno
__________________

Last edited by wyldckat; October 31, 2010 at 13:38. Reason: see "Edit:"
wyldckat is offline   Reply With Quote

Old   October 31, 2010, 14:25
Default
  #3
New Member
 
Jakub
Join Date: Oct 2010
Posts: 12
Rep Power: 15
btgyd is on a distinguished road
Bruno,

Thank you very much for fast and helpful answer . Now I'll have to play a little bit with openFOAM.

I ran the ,,foamRunTutorials" command with the motorbike case, but launching Paraview and applying the case to post-process I can see only the ,,Bounding box" of the wind tunnel and when I turn on the glyphs, their direction seems to be unaffected by the mesh of the motorbike, ie each glyph has a direction exactly along x coordinate. It seems like the code missed to load the bike.

Apart from that tiny inconvenience, everything seems to work very well.

The question is where now the problem is?

Kind Regards,

Kuba
btgyd is offline   Reply With Quote

Old   October 31, 2010, 15:25
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Kuba,

I've got a feeling you skipped the cavity tutorial explanation in the user guide... anyway, here is the post-processing section for the cavity tutorial: http://www.openfoam.com/docs/user/ca...#x5-130002.1.4

To sum up:
  • you are only seeing the first time snapshot, therefore iteration 0 has nothing but the mesh.
  • you are only seeing the bounding box because you didn't change the visualization for the selected pipeline, namely the opened case. If you look carefully in ParaView, you should find a combo box that has something like "bounding box". There you can change to show the wireframe.
A little warning: using OpenFOAM requires caution, attention to details and not going over 5-10 mph/kph while you are still starting to get a grasp on OpenFOAM. Walk, don't run! The software itself is pretty much free, but a somewhat equivalent time must be spent in learning how to use it properly!!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 31, 2010, 15:34
Default
  #5
New Member
 
Jakub
Join Date: Oct 2010
Posts: 12
Rep Power: 15
btgyd is on a distinguished road
Could you please provide more details on where is this combo box located...
btgyd is offline   Reply With Quote

Old   October 31, 2010, 15:48
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Kuba,

Oooops, I forgot it said "Outline", not "boundary box".

Well, attached is a picture showing the controls I talked about.

Best regards,
Bruno
Attached Images
File Type: jpg Screenshot-ParaView.jpg (46.4 KB, 28 views)
__________________
wyldckat is offline   Reply With Quote

Old   October 31, 2010, 16:02
Default
  #7
New Member
 
Jakub
Join Date: Oct 2010
Posts: 12
Rep Power: 15
btgyd is on a distinguished road
Ok, so I figured it out with the outlines, but the problem is that in Mesh Regions dialog I don't have any mesh names under ,,upper wall" box, so no parts for motorbike... It seems like ./Allrun command missed to attach the motorBike snappyHexMesh meshes generated from .stl for me... What do you think?
btgyd is offline   Reply With Quote

Old   October 31, 2010, 16:11
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi again Kuba,

Quote:
Originally Posted by btgyd View Post
What do you think?
I forgot to tell you I was using the internal foam reader, not OpenFOAM's original reader. So what you see on the lower left corner of my attached picture will be different from yours.

I'm going to assume you are using the Debian packages version of OpenFOAM. If so, you can run the following command for changing to the internal reader:
Code:
sudo sed -i -e 's=\.OpenFOAM=\.foam=' $WM_PROJECT_DIR/bin/paraFoam
Now run paraFoam again and you should now see the same controls.

If you want to change back to the original reader, run:
Code:
sudo sed -i -e 's=\.foam=\.OpenFOAM='  $WM_PROJECT_DIR/bin/paraFoam
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 31, 2010, 16:28
Default
  #9
New Member
 
Jakub
Join Date: Oct 2010
Posts: 12
Rep Power: 15
btgyd is on a distinguished road
Hi Bruno,

I did use the code you given me. In the screenshot ( http://img180.imageshack.us/img180/7...utekranuuc.png ) you may notice, that there are certain meshes of motorbike missing in window ,,Mesh Regions" to be shown/imported. The ,,items" I have are only: internalMesh, frontAndBack, inlet, outlet, lowerWall, upperWall.

So running of the code you provided, didn't solve the problem.

What is your suggestion now?

Regards,

Kuba
btgyd is offline   Reply With Quote

Old   October 31, 2010, 18:11
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Kuba,

Mmm, there should be some logs in the folder after you ran foamRunTutorials. If not, try running:
Code:
./Allrun
The file log.snappyHexMesh should have the output from the execution of snappyHexMesh. If something went wrong, it will be listed near the end.
And probably something did go wrong with snappyHexMesh, since you do have the mesh generated by blockMesh, but not the motorbike mesh.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 1, 2010, 04:18
Default
  #11
New Member
 
Jakub
Join Date: Oct 2010
Posts: 12
Rep Power: 15
btgyd is on a distinguished road
There's indeed some problem with snappyHexMesh.

The log file doesn't look very optimistic, too much fatal erors for me


LOG FILE:


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Read mesh in = 0.05 s

Overall mesh bounding box : (-5 -4 0) (15 4 8)
Relative tolerance : 1e-06
Absolute matching distance : 2.29783e-05

Reading refinement surfaces.
Read refinement surfaces in = 4.31 s

Reading refinement shells.
Refinement level 4 for all cells inside refinementBox
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
Checked shell refinement in = 7.92 s


Determining initial surface intersections
-----------------------------------------



--> FOAM FATAL ERROR:
Number of cells in mesh:1280 does not equal size of cellLevel:318755
This might be because of a restart with inconsistent cellLevel.

From function hexRef8::getLevel0EdgeLength() const
in file polyTopoChange/polyTopoChange/hexRef8.C at line 357.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::hexRef8::getLevel0EdgeLength() const in "/opt/openfoam171/lib/linuxGccDPOpt/libdynamicMesh.so"
#3 Foam::hexRef8::hexRef8(Foam:olyMesh const&, Foam::List<int> const&, Foam::List<int> const&, Foam::refinementHistory const&) in "/opt/openfoam171/lib/linuxGccDPOpt/libdynamicMesh.so"
#4 Foam::meshRefinement::meshRefinement(Foam::fvMesh& , double, bool, Foam::refinementSurfaces const&, Foam::shellSurfaces const&) in "/opt/openfoam171/lib/linuxGccDPOpt/libautoMesh.so"
#5
in "/opt/openfoam171/applications/bin/linuxGccDPOpt/snappyHexMesh"
#6 __libc_start_main in "/lib/libc.so.6"
#7
in "/opt/openfoam171/applications/bin/linuxGccDPOpt/snappyHexMesh"
Aborted





How to cope with this?
btgyd is offline   Reply With Quote

Old   November 1, 2010, 05:49
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Kuba,

That has happened to me as well in the past and it was due to switching execution steps. Run:
Code:
./Allclean
./Allrun
And after a while, you should have a nice simulation with the motorbike

If not, try copying the case from the original version again, since something else might have been damaged in the previous executions.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 1, 2010, 13:27
Default
  #13
New Member
 
Jakub
Join Date: Oct 2010
Posts: 12
Rep Power: 15
btgyd is on a distinguished road
Hi,

Let the attachment explain everything ( http://img512.imageshack.us/img512/9...eldfinally.png ) . Finally I succesfully ran the case, thank to your help .

I have a few more question, though... generally speaking I plan to use this case with substituted .stl file to analyze flow over sails and keels. Do you reccomend this case for this application? What modifications shall I take under consideration?

Best Regards,

Jakub
btgyd is offline   Reply With Quote

Old   November 1, 2010, 14:22
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Jakub,

I'm glad you've finally got it working!

But sadly, this is as far as I can help My CFD experience is seriously limited. If you don't understand why, read this: Read this before emailing/PM me

In my signature link, at the end of that blog post, you can find a few links that might be helpful for someone like you who is starting to use OpenFOAM.

Best regards and good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 1, 2010, 16:50
Default
  #15
New Member
 
Jakub
Join Date: Oct 2010
Posts: 12
Rep Power: 15
btgyd is on a distinguished road
Could you please send me the original file with motorBike case, because I have unluckily modified it and now I don't know how to fix it ;/ I made a copy of it at the beggining, but after rebooting my computer, I realised that i wasn;t working on the copy of the folder at all, but on the original cases me, stupid...
btgyd is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 12:13
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21
Two-phase air water flow problems by activating Wall Lubrication Force challenger85 CFX 5 November 5, 2009 05:44
Problems installin OpenFoam-1.5-dev in Ubuntu 8 tmata2002 OpenFOAM Installation 2 September 23, 2009 10:50
boussinesq model problems help needed nabeel mohsin Main CFD Forum 1 July 29, 2004 19:10


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