# Problems with layering at moving boundaries

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

November 28, 2017, 08:45
Problems with layering at moving boundaries
#1
New Member

Join Date: Mar 2016
Posts: 6
Rep Power: 5
Hello!

I'm working on a case similar to a cilindrical dam opening gradually with constant velocity and 2D geometry.

The mesh and boundary conditions are displayed at figure 01.

At first, I attached a CG_MOTION UDF for the boundary condition "moving wall" and "pressure outlet" at the top; that way, the walls of the dam would follow the movement of both boundary conditions (moving wall and pressure outlet) and it would open.

The UDF used:

#include "udf.h"
#include "dynamesh_tools.h"

//static real max_disp = 0.004;
//static real velocity = 0.1;
DEFINE_CG_MOTION(movingWall,dt,vel,omega,time,dtim e)
{
NV_S(vel,=,0.0);
NV_S(omega,=,0.0);
static real x0 = 0.001; // meters
static real velocity = 0.1;
real x;

if (!Data_Valid_P())
return;
//vel[0] = -velocity*pow(-1, (int)floor(time / (max_disp / velocity)));

if (time == dtime)
x = x0 + velocity*dtime;
else
x = x + velocity*dtime;

Message ("Info: updating position x = %f, and velocity v = %f.\n", x, velocity);
//vel[0] = velocity;
vel[0] = 0.1;
}

Since i'm using a rectangular mesh, i choose the layering technique for the dynamic mesh. But i'm experiencing some problems as it follows at figure 2. The mesh isn't relayering and i got a negative volume error.

Could somebody help with this problem? If i wasn't clear at my questions, please ask me.

Yuri Taglieri
Attached Images
 fig1cfd.PNG (26.4 KB, 8 views) fig2cfd.PNG (14.9 KB, 8 views)

 Tags dynamic mesh, layering method, moving wall, negative volume cell, udf