Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Brian Angel
Posts: 98
Joined: Mon Jul 22, 2013 12:53 pm


Post by Brian Angel »


I am using the routine cs_user_mesh.c to do two things:

1) create a series of thin walls in my volume mesh
2) collect all the free faces in my mesh in order to give them a wall type boundary condition

For 1):
I wish to collect a volume of cells and convert all the cell faces in this volume from internal faces to boundary faces in order to divide a given volume mesh into two seperate zones. I am using the command "plane[0,0,-1,5.0, epsilon=0.001]" on a test case but would like to know the following:

a) are the inputs for this command "plane[x, y, normal direction, z, tolerance]"?
b) is there a command word, such as "volume", that can be used to collect a volume of cells instead of a plane?
c) is it possible to use the command 'getcel' with 'x,y,z' limits in cs_user_mesh.c and if so, can you send me an example of how this is coded?

For 2):
I have copied the coding from the routine located in SRC/EXAMPLES/cs_user_mesh-groups-from-free-faces.c and put it into the cs_user_mesh.c routine that I am using. Can you please let me know:

a) what is the name of the group in which the free faces are stored?
b) is this group with the free faces available to be used by other routines, i.e. cs_user_boundary_conditions.f90, so that this group can be given a wall type boundary condition?
c) if this group isn't available to other routines, how can it be made available?

Best regards,

Brian Angel.
Yvan Fournier
Posts: 3105
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs_user_mesh.c

Post by Yvan Fournier »

Hello Brian,

For 1):
a,b) all selection criteria are detailed in the pdf user manual (search for "selection" or "box" for example).
c) Yes, in C, the equivalent of getcell is cs_selector_get_cell_list (check all functions described in base/cs_selector.h). For some routines, such as the one for thin walls, you need to build the selector strutures first, unless you are using version 4.2 or above (just do not remove those from the examples).

For 2):
a) there is no group name for this. Free faces keep the group name they have upon reading (this example was added for usage with SALOME's "hexotic" or "Mesh Gems Hexa" mesher, which drops group names on the mesh boundaries, so as to interpolate group names from the original boundary mesh to the ne mesh).
b) no, those free faces are not connected to the mesh. Hence the "interpolation" in a)
c) this is the exact purpose of the "interpolation" in the example.


Post Reply