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

Open Foam Tutorials

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2014, 03:06
Default Open Foam Tutorials
  #1
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
I've been working through the tutorials and decided to attempt the motobike tutorial.

I have managed to generate the mesh using blockmesh, snappyHexMesh.

I still am unable to see the bike in paraFoam even after searching through the various threads. Someone mentioned reduce the xmin and ymax but I wasnt able to locate these options. Thoughts? Should I continue to suffer for a right of passage?

It appears that this tutorial contains boundary conditions so I assumed I could run icoFoam or simpleFoam to obtain a solution. Is this correct.

In attempt to run icoFoam and simpleFoam it closes by saying the following:

Create time

Create mesh for time = 3

Reading transportProperties

Reading field p



--> FOAM FATAL IO ERROR:
cannot open file

file: /home/adam/OpenFOAM/OpenFOAM-1.6.x/tutorials/incompressible/simpleFoam/motorBike/3/p at line 0.

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

FOAM exiting

I looked at the "3" folder which I believe is the final mesh folder and was not able to locate "p at line 0"
Sachin m is offline   Reply With Quote

Old   August 19, 2014, 09:15
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
well, i guess you are in wrong place
if i understood you correctly, you are going to run icoFoam, so this solver needs file p, as there is no file p (pressure file) in that folder, it exits
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   August 19, 2014, 16:47
Default
  #3
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
snappyHexMesh - if not specified with the -overwrite parameter - generates 3 time directories in your case folder. You have to access the last time with paraview, in order to see the motorbike. You can simply click on the play icons in to top right corner.

A nice option is to use the -overwrite option, which writes the mesh into constant/polyMesh, rathan <time>/polyMesh. Then you can execute the solver right away.
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   August 19, 2014, 17:26
Default
  #4
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
Sachin m

to view the mesh in paraFoam you have to remove the selection of volumefields because they are not yet there. To run the case you need to copy the 0 directory files of p, U etc to the last time dir and than you can start the simulation from there. Beter is to copy the mesh to the constant dir and remove all time directories except 0.

Hope this helps
Wouter
wouter is offline   Reply With Quote

Old   August 20, 2014, 07:28
Default
  #5
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
Thanks everyone for ur replies. I ll run it and let you knw the results.
In between I was trying with the wigley hull tutorials. I was able to run on LTSInterFoam. But iam unable to view the results on paraview.
I had changed the file name of alpha1.org to alpha1 to run the simulation.
In paraview,when i tried to switch on the volume meshes, the program closes with a warning :


~/OpenFOAM/ubuntu-2.1.0/run/wigleyHull(1604) paraFoam
created temporary 'wigleyHull.OpenFOAM'
--> FOAM Warning :
From function polyMesh::readUpdateState polyMesh::readUpdate()
in file meshes/polyMesh/polyMeshIO.C at line 204
Number of patches has changed. This may have unexpected consequences. Proceed with care.


--> FOAM FATAL IO ERROR:
size 12000 is not equal to the given value of 182759

file: /home/ubuntu/OpenFOAM/ubuntu-2.1.0/run/wigleyHull/200/U from line 18 to line 13248.

From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file lnInclude/Field.C at line 236.

FOAM exiting

Segmentation fault (core dumped)
~/OpenFOAM/ubuntu-2.1.0/run/wigleyHull(1605)


what could be the possible reason.
Sachin m is offline   Reply With Quote

Old   August 20, 2014, 08:33
Default
  #6
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
Read the error messages, they usually tell you what went wrong. In this case, the U field in the 200 directory does not have the same length (cell numbers) as the polyMesh. This usually happens when you don't clean up your case properly, before rerunning it.
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   August 21, 2014, 01:42
Default
  #7
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
thanks everyone. I have successfully run the wigley hull tutorial and was able to view the pressure contour. But the results seems a little weird. May b because I am not much used with paraview.
Sachin m is offline   Reply With Quote

Old   August 21, 2014, 01:52
Default
  #8
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
Can anyone tell me where in the code does we specify the free surface parameters
Sachin m is offline   Reply With Quote

Old   August 21, 2014, 02:21
Default
  #9
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
How can I get the drag value on the hull?
Sachin m is offline   Reply With Quote

Old   August 21, 2014, 02:26
Default
  #10
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
Just google it. Drag can be computed via the forces function object and the free surface can be visualized by a contour at alpha=0.5
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   August 22, 2014, 00:09
Default
  #11
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
I meant how do we specify a particular free surface plane for a particular case?
Free surface can be different for different cases. Where do we specify the free surface in a case?
Sachin m is offline   Reply With Quote

Old   August 22, 2014, 04:00
Default
  #12
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
You mean how to initialize the free surface? Use setFields or funkySetFields and have a look into the multiphase tutorials. That is explained there (well, not explained, but shown) in a sufficient manner.

Spoiler: You don't actually specify the free surface itself, but the volume fraction alpha1.
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   August 22, 2014, 05:04
Default
  #13
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
yup...I see:

defaultFieldValues
(
volScalarFieldValue alpha1 0
);

regions
(
boxToCell
{
box (-100 -100 -100) (100 100 0);
fieldValues
(
volScalarFieldValue alpha1 1
);
}
);



Can you explain this to me please.??
Sachin m is offline   Reply With Quote

Old   August 22, 2014, 05:10
Default
  #14
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
Just try google to find something on "OpenFOAM" and "setFields", it's not too hard. First hit: http://www.cfd-online.com/Forums/ope...setfields.html
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   August 26, 2014, 00:13
Default
  #15
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
Have anyone tried the wigley hull tutorial with a customized hull and succeeded in running the program?
If so please help me out with the steps to be carried out
Sachin m is offline   Reply With Quote

Old   August 26, 2014, 03:07
Default
  #16
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
can anyone tell me how to install netgen on linux
Sachin m is offline   Reply With Quote

Old   August 27, 2014, 02:54
Default
  #17
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
Iam working on a customized hull.when i used snappyhexmesh, i got the following error message:

/ubuntu-2.1.0/run/wigleyHull(2008) paraFoam
created temporary 'wigleyHull.OpenFOAM'
~/OpenFOAM/ubuntu-2.1.0/run/wigleyHull(2009) snappyHexMesh -overwrite
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-0bc225064152
Exec : snappyHexMesh -overwrite
Date : Aug 27 2014
Time : 17:31:26
Host : "ubuntu"
PID : 5226
Case : /home/ubuntu/OpenFOAM/ubuntu-2.1.0/run/wigleyHull
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Read mesh in = 0.07 s

Overall mesh bounding box : (-10750 -5750 -5500) (20250 5750 5539.9)
Relative tolerance : 1e-06
Absolute matching distance : 0.0348587

word::stripInvalid() called for word ��~?�-����ҽ��i?t�D�ȒD+�Z?�ίD��D�cU?��D3k�D
For debug level (= 2) > 1 this is considered fatal
Aborted (core dumped)
~/OpenFOAM/ubuntu-2.1.0/run/wigleyHull(2010)



Can anyone tell me what the problem could be?

I had to scale the geometry using convert to meter and the value was 1000.
The hull was modelled in Free ship and was imported to solidworks and was then converted to stl format, since the stl file generated from the freeship was just a half part of the symmetric body.
Sachin m is offline   Reply With Quote

Old   August 27, 2014, 17:05
Default
  #18
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
hello,

I am no expert, but I think that your STL file is binairy and should be ascii.

hope this helps
Wouter
wouter is offline   Reply With Quote

Old   August 27, 2014, 23:25
Default
  #19
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
Thats true wouter, the problem was with the geometry file.
the stl file imported from solidworks has got some problems.
Sachin m is offline   Reply With Quote

Old   August 29, 2014, 01:08
Default
  #20
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
I tried a wigley hull tutorial with my own hull. But when i ran snappy HexMesh, icould only see the ship meshed, the outside domain just disappeared.

what could be the posible reason?
Sachin m is offline   Reply With Quote

Reply


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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 01:41
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
interFoam & decomposition method: scotch MacGyver OpenFOAM Running, Solving & CFD 2 May 23, 2012 07:00


All times are GMT -4. The time now is 05:22.