CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   some basic problems, little help needed (http://www.cfd-online.com/Forums/openfoam/81584-some-basic-problems-little-help-needed.html)

btgyd October 31, 2010 13:50

some basic problems, little help needed
 
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

wyldckat October 31, 2010 14:34

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

btgyd October 31, 2010 15:25

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

wyldckat October 31, 2010 16:25

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

btgyd October 31, 2010 16:34

Could you please provide more details on where is this combo box located...

wyldckat October 31, 2010 16:48

1 Attachment(s)
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

btgyd October 31, 2010 17:02

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?

wyldckat October 31, 2010 17:11

Hi again Kuba,

Quote:

Originally Posted by btgyd (Post 281575)
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

btgyd October 31, 2010 17:28

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

wyldckat October 31, 2010 19:11

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

btgyd November 1, 2010 05:18

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::printStack(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::polyMesh 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?

wyldckat November 1, 2010 06:49

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

btgyd November 1, 2010 14:27

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

wyldckat November 1, 2010 15:22

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

btgyd November 1, 2010 17:50

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...:o


All times are GMT -4. The time now is 13:27.