Boundary condition for non-standard inlet and outlet

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
zihenwuming

Boundary condition for non-standard inlet and outlet

Post by zihenwuming »

Hello everyone,
I need to set a non-constant inlet and non-gradient outlet boundary condition for a 3D mesh, the needs are showed in the pictures below, I tried the Mathematical expression editor, but I couldn't make it work. Could anyone help me to deal with it ? Thank you.
BTW: this editor and the cs user boundary conditions, are they the same things ?
Thanks again to all.

Wei
Attachments
boundary conditions.png
mesh.png
leguichet
Posts: 34
Joined: Wed Sep 03, 2014 1:00 pm

Re: Boundary condition for non-standard inlet and outlet

Post by leguichet »

Hi Wei,

For this kind of boundary condition, I suggest you to use cs_user_boundary_condition.f90 to impose the boundary conditions properly. It can be found in the folder SRC/REFERENCE.

For the inlet, you can use getfbr('1',nlelt,lstelt) to select the boundary faces. Then you use cdgfbo(dim,nfabor) to retrieve the center coordinates of each face, so that you can calculate the velocity of each face.

For your output, I think it is the standard the gradient zero output as shown in your figure.

For the upper wall gliding condition, you just need to pose a Neumann condition for the velocity component x, y, and a Dirichlet condition for component z.

Hope that they are useful for you. If you have questions about the functions, you'd better check out the user-guide and some tutorials.

Bests

Zhenlan
zihenwuming wrote:Hello everyone,
I need to set a non-constant inlet and non-gradient outlet boundary condition for a 3D mesh, the needs are showed in the pictures below, I tried the Mathematical expression editor, but I couldn't make it work. Could anyone help me to deal with it ? Thank you.
BTW: this editor and the cs user boundary conditions, are they the same things ?
Thanks again to all.

Wei
Post Reply