CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

Some perhaps stupid questions about calculix

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 15, 2007, 08:36
Default Hello OpenFoamers, i'm tota
  #1
New Member
 
Oliver Sommer
Join Date: Mar 2009
Posts: 12
Rep Power: 8
lynx is on a distinguished road
Hello OpenFoamers,

i'm total new to cfd and i just started reading the userguide for OpenFoam. Through this discussion group i read about calculix which i want to use for creating meshes on geometries which i want to use in OpenFoam later. I worked through the calculix tutorial step by step and so i got some questions.

What is the right meshtype meshing my geometry in cgx to convert it to use it then in OpenFoam? (the he8 or he20 hex brick - what is the difference between them?)

When i want to store the mesh, which format i have to choose? (the .fbd, the .frd or the .msh fileformat? (is the mesh then allready converted and ready being imported by Openfoam?)

Atm i have no Linux-machine and thats why i have this questions, 'cause i can only "play" (learning by doing) with the windows version of Calculix.

I hope you can help me a little bit with my questions. Thank you in advance.
lynx is offline   Reply With Quote

Old   October 15, 2007, 09:16
Default Q1: the only right mesh type i
  #2
Senior Member
 
mkraposhin's Avatar
 
Matvej Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 172
Rep Power: 8
mkraposhin is on a distinguished road
Q1: the only right mesh type is HE8!!!

Q2: you can store geometry and mesh options in .fbd format, but CalculiX can save mesh in native OpenFOAM format (write foam ...)

Some Notes: you should add ALL external faces to some SETS, which then will be interpreted as patch

P.S.
if You can wait, i can pos here a small sample CGX file for OpenFOAM case

P.P.S.
I'm using Perl scripts to generate .fbd file with geometry and to convert this geometry to OpenFOAM format with CGX

Good luck!
mkraposhin is offline   Reply With Quote

Old   October 15, 2007, 10:55
Default Oliver, Your geometry is sa
  #3
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8
gdbaldw is on a distinguished road
Oliver,

Your geometry is saved in FBD format. When you are ready to mesh your geometry, type the command "mesh all". Then, to export the mesh to OpenFOAM format type "send all foam patch all". Do "checkMesh" in OpenFOAM to make sure the mesh is good.

When this works, you will then want to use "qadd" to create sets for your patches. Assign only the external surfaces of your geometry to each set. Then, enter the command "comp <setname> d" for each set of faces. This will add the lines and points associated with the surfaces to the set. Now, you must delete your mesh with "del me". Don't worry, your geometry is still saved. Mesh again with "mesh all". This time each set will include the faces of your patch. You can now export to OpenFOAM with the patches by typing a command something like "send all foam patch input patch output symmetryPlane symmetry wall wall".

Everytime you save to FBD, only the geometry is saved. You must generate the mesh from each time you load the geometry into Calculix.

Doug
gdbaldw is offline   Reply With Quote

Old   October 25, 2007, 08:24
Default Hello again, thank you very
  #4
New Member
 
Oliver Sommer
Join Date: Mar 2009
Posts: 12
Rep Power: 8
lynx is on a distinguished road
Hello again,

thank you very much for the help, it worked so far on an simple example which i build in Calculix (cgx).
I build a simple cube and the command "send all foam patch all" worked fine. I recieved 4 files in the directory.

Then i tried your hint Doug. I assigned the six external surfaces to six sets accordingly. Then i used the command "comp <setname> d" and meshed new (deleted the old mesh before). But then i got some problems with the "send all foam patch input patch output symmetryPlane symmetry wall wall"-command.

I assigned one surface (set) of the cube as "patch input", one as "patch output" and the rest four surfaces (sets) as "walls" through their setnames. As result of entering the command cgx said, that it couldn't save all nodes from the total node-number. Missed i something or did i something wrong?

For what is the parameter "symmetryPlane symmetry"? What have i to enter there and have i to declare it everytime, because it is a essential part of the command?


At last i have a other question to Calculix.

How is the right command to import a geometry provided by a CAD-file?
Is it: "cgx -a <filename.fbd> <cad-filename.vda>"?

Are the basic-Windows-version or the Linux-version, respectively, able to import CAD-files in "STEP" and/ or "IGES"-format? I read that they can import vda-CAD-format only. I never heard about a vda-format before.


Again i thank you in advance.

Oliver
lynx is offline   Reply With Quote

Old   October 25, 2007, 09:54
Default Oliver, I expect you indeed
  #5
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8
gdbaldw is on a distinguished road
Oliver,

I expect you indeed missed something since "send all foam patch all" did work. Next, you should be able to use the following command, "send all foam patch <seta> patch <setb> ... patch <setf>" where <seta> through <setf> are your Calculix sets. Once that works, you can replace "patch" with other OpenFOAM recognized identifiers such as wall, wallFunctions, symmetryPlane, etc. You'd need to see the OpenFOAM manual for information on these identifiers.

I only use Blender to create geometry for Calculix, and have no experience with importing CAD. You could search this forum for a script I created for importing Blender into Calculix.

Doug
gdbaldw is offline   Reply With Quote

Old   June 26, 2008, 02:35
Default dear all, I encounter the fol
  #6
Member
 
Ivan Lau
Join Date: Mar 2009
Location: Hong Kong
Posts: 56
Rep Power: 8
ivanwhlau is on a distinguished road
dear all,
I encounter the following error when I try to export Calculix to OpenFoam:

ERROR: number of specified outer faces:368 does not match detected faces:480
wrote foam mesh

Can someone help me, please?

Complete error
---------------------
send all foam patch in patch out empty top empty bottom symmetryPlane left symmetryPlane right wall wall empty null
please wait for 'ready'
use boundary: type:patch set:in
use boundary: type:patch set:out
use boundary: type:empty set:top
use boundary: type:empty set:bottom
use boundary: type:symmetryPlane set:left
use boundary: type:symmetryPlane set:right
use boundary: type:wall set:wall
use boundary: type:empty set:null
ERROR: number of specified outer faces:368 does not match detected faces:480
wrote foam mesh
ivanwhlau is offline   Reply With Quote

Old   June 26, 2008, 03:34
Default First, try send all foam pa
  #7
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8
gdbaldw is on a distinguished road
First, try

send all foam patch all

You may then want to checkMesh

If this is good, you can now work on your Sets of Faces. If you are depending on Sets of Surfaces to automatically define your Sets of Faces when you generate the mesh, be sure to include the vertices at the edges in both Sets. A good way to see which Faces you are missing is to create a Set that includes first all of the Faces (lets name this set wasAll), and then one-by-one remove the Faces of your subsets, e.g.

setr wasAll se inlet
setr wasAll se outlet
etc.

When done;

plot f wasAll

...to see the Faces that were not in any of your subsets.

Doug
gdbaldw is offline   Reply With Quote

Old   June 26, 2008, 06:48
Default Hi, Ivan, You might have in
  #8
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 9
hsieh is on a distinguished road
Hi, Ivan,

You might have internal faces in you mesh. Do you have multiple bodies? If you have more than 2 bodies, then, do the surface elements on the shared boundaries conformal?

Do a "merge n all" to see if you can merge the nodes on the shared boundaries. You can use "merge n all tolerance", where tolerance is the input tolerance valve for merging.

Pei
hsieh is offline   Reply With Quote

Old   June 27, 2008, 04:18
Default Hi, Doug and Pei, Thanks
  #9
Member
 
Ivan Lau
Join Date: Mar 2009
Location: Hong Kong
Posts: 56
Rep Power: 8
ivanwhlau is on a distinguished road
Hi, Doug and Pei,
Thanks for your help.
I figured out my problem now.
Ivan
ivanwhlau is offline   Reply With Quote

Old   July 1, 2008, 23:32
Default Hi, all, I have another
  #10
Member
 
Ivan Lau
Join Date: Mar 2009
Location: Hong Kong
Posts: 56
Rep Power: 8
ivanwhlau is on a distinguished road
Hi, all,
I have another error after checkMesh is performed. What is my problem now? Also, this is the error I got when I have very coarse mesh. when I fineMesh it, it even didn't check Mesh but give me a printstack error? any idea? thanks in advance.

Ivan

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : checkMesh . tt3d
Date : Jul 02 2008
Time : 11:29:34
Host : CEY004
PID : 31963
Root : /home/ilau/OpenFOAM/ilau-1.4.1/run/research/tt_turbFoam
Case : tt3d
Nprocs : 1
Create time

Create polyMesh for time = constant

Time = constant

Mesh stats
points: 1485
edges: 4028
faces: 3632
internal faces: 2896
cells: 1088
boundary patches: 7
point zones: 0
face zones: 0
cell zones: 0

Number of cells of each type:
hexahedra: 1088
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
***Open cells found, number of cells: 360. This problem may be fixable using the zipUpMesh utility.
<<Writing 360 cells with over used edges to set zipUpCells
Face vertices OK.
Face-face connectivity OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface
in 96 117 ok (not multiply connected)
out 96 117 ok (not multiply connected)
wall 80 89 ok (not multiply connected)
ground 128 160 ok (not multiply connected)
left 96 117 ok (not multiply connected)
right 96 117 ok (not multiply connected)
lv3 144 169 ok (not multiply connected)

Checking geometry...
Domain bounding box: (-25 -27.4 -0) (45 41.1 24)
Boundary openness (-2.20957e-16 0 -3.27569e-16) OK.
***Open cells found, max cell openness: 1, number of open cells 360
<<Writing 360 non closed cells to set nonClosedCells
Minumum face area = 2.275. Maximum face area = 61.4788. Face area magnitudes OK.
Min volume = 10.3892. Max volume = 906.93. Total volume = 163318. Cell volumes OK.
Mesh non-orthogonality Max: 178.799 average: 39.812
*Number of severely non-orthogonal faces: 224.
***Number of non-orthogonality errors: 285.
<<Writing 509 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 763 faces are incorrectly oriented.
<<Writing 739 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 61564.9, 583 highly skew faces detected which may impair the quality of the results
<<Writing 583 skew faces to set skewFaces
Min/max edge length = 1 8.975 OK.
All angles in faces OK.
Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1
All face flatness OK.

Failed 5 mesh checks.

End
ivanwhlau is offline   Reply With Quote

Old   July 2, 2008, 09:58
Default Ivan, In CalculiX after gen
  #11
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8
gdbaldw is on a distinguished road
Ivan,

In CalculiX after generating the mesh, from the command menu use "View->Show Bad Elements" to see any errors before you send to foam. Once you have no bad elements in CalculiX, and if you still have errors following checkMesh, use the setSet command to create objects that you can view in paraFoam. Search other threads of this forum for details on setSet and paraFoam. Any errors you find in checkMesh can best be fixed back in CalculiX by adjusting your geometry.

Doug
gdbaldw is offline   Reply With Quote

Old   May 17, 2010, 06:48
Default I have some doubts !!
  #12
New Member
 
Manibabu
Join Date: May 2010
Posts: 1
Rep Power: 0
manibabu is on a distinguished road
I am new to Calculix but learned all the basic commands and stuff. I am using ccx too.
1) How to join to bodies in calculix example. there are 2 concentric cylinders with different radii and heights. in fbd .
2) And how to cut from the main object like to create a hallow cylinder.
3) if I add to bodies to a set, does those geometrically single or they are just like variables in an array?
4) can we create an hexagonal face in Calculix. as the qsur command takes only 3-5 lines are arcs.
Looking forward for a quick reply,
Mani
manibabu is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dealing with stl files from Calculix in Netgen psosnows Open Source Meshers: Gmsh, Netgen, CGNS, ... 7 July 11, 2011 11:17
Blender Calculix he8 polyMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 3 October 2, 2008 11:33
Calculix help ivanwhlau OpenFOAM Pre-Processing 0 July 9, 2008 01:37
CalculiX can write now a ployMesh klaus Open Source Meshers: Gmsh, Netgen, CGNS, ... 6 December 12, 2007 06:02
stupid question Andrew Hayes Main CFD Forum 9 December 20, 2005 12:25


All times are GMT -4. The time now is 04:49.