CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   3D free surface and VOF (https://www.cfd-online.com/Forums/fluent/30897-3d-free-surface-vof.html)

Orome February 5, 2003 14:48

3D free surface and VOF
 
Hi, we are trying to simulate a 3D channel with a free surface. Our problem rise when we want to include the udf function outlet_pressure:

#include "udf.h"

#include "sg_mphase.h"

#define RHO_WATER 998.2

#define RHO_AIR 1.225

#define G 9.81

DEFINE_PROFILE(outlet_pressure,thread,nv)

{ face_t f;

real ymax=-1e4;

real x[ND_ND];

Thread *t_phase2=THREAD_SUB_THREAD(thread,1);

begin_f_loop(f,thread) {

F_CENTROID(x,f,thread);

if ((ymax < x[1]) && (F_VOF(f,t_phase2) > 0.5)) ymax=x[1]; }

end_f_loop(f,thread)

begin_f_loop(f,thread) {

F_CENTROID(x,f,thread);

F_PROFILE(f,thread,nv)=0;

if (x[1] < ymax) F_PROFILE(f,thread,nv)=G*(RHO_WATER-RHO_AIR)*(ymax-x[1]); }

end_f_loop(f,thread) }

Then Fluent gives the message

Error: fluent.6.0.20 received a fatal signal (SEGMENTATION VIOLATION). Error Object: #f

and it exit. We have no idea where is the error.

Thank you in advance for your help.


phd_y2k2001@yahoo.com February 6, 2003 22:48

Re: 3D free surface and VOF
 
Just curious, why do you need to write udf function outlet_pressure??

Orome February 7, 2003 07:12

Re: 3D free surface and VOF
 
Well, we have a velocity inlet (water), a pressure inlet (air), a pressure outlet (water & air) and walls as boundary conditions. We want to fix the pressure at the outlet depending on hidrostatic pressure.

Heydari February 8, 2003 07:35

Re: 3D free surface and VOF
 
I think for your problem , you can use pressure inlet condition for the whole of your domain except your wall b.c.

Orome February 10, 2003 05:27

Re: 3D free surface and VOF
 
Maybe, but we think that it is not the poblem, because when we fix the height (and then we don't have to find it), the routine works. It fails when we try to find the position of the free surface.

varshavian February 16, 2003 04:32

i think u can help me
 
i want to model an open channel junction i have two problem 1-i have two phases,air and water at the inlet(velocity inlet).depth of water is about 0.3m and total depth of channel is 0.5m and the rest of it is fuul of air.what is the fraction of water at the entrance and outlet?is water primary phase? 2-how can i give velocity profile at the entrance of channel to program?i have experimental data. please tell me how i can model free surface? thanks

Orome February 17, 2003 12:07

Re: i think u can help me
 
The primary phase must be always the lighter phase (air) and then water will be the secondary phase. I don't know how to give a velocity profile at the entrance of the channel, I always give an average velocity. I am sorry ( :( ) In the "Boundary conditions --> Velocity inlet Zone" I fix the Volume Fraction for secondary phase (water) to 1.


All times are GMT -4. The time now is 12:25.