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

Help with OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By blacksquirrel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2014, 11:42
Default Help with OpenFoam
  #1
New Member
 
Eliezer
Join Date: Apr 2014
Posts: 2
Rep Power: 0
Eli_Brazil is on a distinguished road
Hello everyone!
I need some help... I'm a beginner with OpenFoam and I'm trying to do a laminar flow simulation past a cylinder, but I've got a lot of problems. I'll try to explain what I'm doing to see if somebody can help me.

1º - I created a geometry in Salome and created groups by faces, Inlet, Outlet and Wall... My geometry is a cylinder, radius 17,5 mm and height 480mm. Saved.

2º - I created a mesh, using algorithm netgen 1D-2D-3D, Hypotesis netgen 3D parameters... Compute and created a group from geometry, Inlet, Outlet and Wall...

3º - I exported the mesh like .unv archive to tutorial folder... I'm using incompressible and icoFoam... Ok, here begin the problems... When I'm into the folder created to my file in caelinux terminal, I execute ideasUnvToFoam Cylinder1.unv for ex. I get error... I have to copy and paste a "system" folder from the other same case... When I execute again, everything looks fine, but when I checked the folder, I saw that the others necessary files and folders doesn't was created. I tryed copy and edit files of another cases but I always have a problem...

I realy dont know what can i do... Sorry about my "Brazilian" english, I realy hope that you understood me!!!

If somebody help me I'll thank for ever!

Regards,

Eli
Eli_Brazil is offline   Reply With Quote

Old   April 8, 2014, 11:50
Default
  #2
Member
 
Join Date: Jun 2011
Posts: 53
Rep Power: 15
blacksquirrel is on a distinguished road
Hi Eli,

So I hope I understood correctly: You have a mesh in *.uns format and are stuck at translating this mesh to the OpenFOAm standard?

So let's try this step by step:
1. you have a working folder ("test") in your run directory, where your cylinder.uns is saved

2. inside this folder you need the subfolders system (copy from e.g. tutorial), constant/polyMesh and 0 (the last two can be empty, I think)

3. execute ideasUnvToFoam

4. when no error messages occur, check the mesh in paraFoam
blacksquirrel is offline   Reply With Quote

Old   April 8, 2014, 12:54
Default
  #3
New Member
 
Eliezer
Join Date: Apr 2014
Posts: 2
Rep Power: 0
Eli_Brazil is on a distinguished road
Yes, you understood correctly, but my mesh is *.unv...

I followed the step by step and execute ideasUnvToFoam and no error occured in the caelinux terminal...
I have one doubt, have I to execute blocKmesh and icoFoam before the paraFoam?
Because when I was check the mesh on Paraview occured one error and closed the paraview...
That is the error:
--> FOAM FATAL IO ERROR:

patch type 'patch' not constraint type 'empty'
for patch Wall of field p in file "/home/caelinux/OpenFOAM/caelinux-2.1.0/run/tutorials/incompressible/icoFoam/cylinder1/0/p"

file: /home/caelinux/OpenFOAM/caelinux-2.1.0/run/tutorials/incompressible/icoFoam/cylinder1/0/p::boundaryField::Wall from line 35 to line 35.

From function emptyFvPatchField<Type>::emptyFvPatchField
(
const fvPatch& p,
const Field<Type>& field,
const dictionary& dict
)

in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 100.

FOAM exiting

The problem is in the "p" file in the "0" folder... But I dont know how to edit that file... I think thet openfoam have to generate all the files... Is that correct? The folders are uncompleted...

And thanks for the quick answer!
Eli_Brazil is offline   Reply With Quote

Old   April 9, 2014, 04:16
Default
  #4
Member
 
Join Date: Jun 2011
Posts: 53
Rep Power: 15
blacksquirrel is on a distinguished road
Hi Eli,

No you don't need to do blockMesh or icoFoam before paraFoam.
blockMesh is the meshing utility of OpenFoam, so it's a program on its own if you want to build a mesh. But you already have a mesh and just translate it into the correct format for OpenFoam with the "ideasUnvToFoam" utility.

1. to check your mesh you don't need to read the Volume Fields in paraFoam.
So first open paraFoam.
On the left side you see the properties window, where you can choose the mesh parts and the volume fields. uncheck all the volume fields, press the apply button and have a look at your mesh first.

2. Now we can look at the boundary conditions (which is giving you the error message for the 0/p file)
- have a look at constant/polyMesh/boundary
here you see all the boundary patches of your mesh, where you need to define boundary conditions. There are different type of patches (http://www.openfoam.org/docs/user/boundaries.php),
inlet and outlets should have the type "patch", walls the type "wall".
OpenFoam can handle only 3D meshes, so if you have a 2D mesh you have "empty" patches (look at the icoFoam/cavity tutorial for this)
- now open the files in your 0 directory. You need to specify boundary conditions for each patch of your mesh. Make sure to use exactly the same names, as in the polyMesh/boundary file.
Take a look at the icoFoam/cavity tutorial as well. Here you see how to set boundary conditions.
For some patch types, you can set only specific boundary conditions (like wall functions only for walls, symmetry conditions only for symmetry-planes etc.)
But you will probably need only fixedValue and zeroGradient for your first try.
(You can switch to more fancy boundary conditions, when you are more familiar with the OpenFoam structure.)

3. Before starting icoFoam, please consult the cavity/tutorial on how to set the controlDict (startTime, endTime, writeControl etc.). Then you can start icoFoam and hopefully everything runs.
Eli_Brazil likes this.
blacksquirrel is offline   Reply With Quote

Old   April 9, 2014, 10:00
Default
  #5
Member
 
Join Date: Jun 2011
Posts: 53
Rep Power: 15
blacksquirrel is on a distinguished road
Oh, and I forgot: After converting of your mesh, you should execute "checkMesh". If it says 'Mesh OK.' you can continue with boundary conditions.
blacksquirrel is offline   Reply With Quote

Reply

Tags
blockmesh, ideasunvtofoam, laminar flow


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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
OpenFOAM Foundation Releases OpenFOAM v2.3.0 opencfd OpenFOAM Announcements from OpenFOAM Foundation 3 December 23, 2014 04:43
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
OpenFOAM Training and Workshop Hrvoje Jasak Main CFD Forum 0 October 7, 2005 08:14


All times are GMT -4. The time now is 03:28.