Commit 010232f1 authored by Matthieu Constant's avatar Matthieu Constant
Browse files

poiseuille + équations de Stokes transitoire qui donnent la bonne solution mais convergent pas quad

parent dbfed74e
......@@ -241,7 +241,7 @@ static void f_u_0(
for (int k = 0; k < D; ++k) {
utau += u[k]*(du[j][k]-u[j]*dq[k]/q);
}
f[j] = 0*rho*((u[j]-uold[j])/dt + 0*u[j]/q*divu + 0*utau/q);
f[j] = rho*((u[j]-uold[j])/dt + 0*u[j]/q*divu + 0*utau/q);
}
}
......@@ -251,7 +251,7 @@ static void f_p_0(double *f, const double du[D][D], const double q, const double
for (int j = 0; j < D; ++j) {
divu += du[j][j];
}
*f = divu+(q-qold)/dt;
*f = divu+0*(q-qold)/dt;
}
static void f_q_0(double *f, const double c, const double q)
......@@ -265,7 +265,7 @@ static void f_u_1(double f[D][D], double u[D], const double du[D][D], const doub
double tau[D][D];
for (int i = 0; i < D; ++i) {
for (int j = 0; j < D; ++j) {
tau[i][j] = du[i][j]-0*u[i]*dq[j]/q;
tau[i][j] = du[i][j]-u[i]*dq[j]/q;
}
}
for (int j = 0; j < D; ++j) {
......@@ -289,7 +289,8 @@ static void fluid_problem_assemble_system(FluidProblem *problem, double *rhs, co
HXTLinearSystem *lsys = problem->linear_system;
const Mesh *mesh = problem->mesh;
//a generaliser
double deps = 1e-10;
double deps = 1e-12;
const double *solution = problem->solution;
const double *porosity = problem->porosity;
const double *old_porosity = problem->old_porosity;
......
......@@ -42,14 +42,14 @@ ii = 0
#physical parameters
g = -9.81 # gravity
rho = 1000 # fluid density
nu = 1e-6 # kinematic viscosity
nu = 1e-3 # kinematic viscosity
mu = nu*rho # dynamic viscosity
tEnd = 1000 # final time
#numerical parameters
lcmin = 0.1 # mesh size
dt = 5e-2 # time step
alpha = 7e-6 # stabilization coefficient
alpha = 1e-4 # stabilization coefficient
epsilon = alpha*lcmin**2 /nu # stabilization parametre
print('epsilon',epsilon)
......@@ -59,7 +59,7 @@ outf = 10 # number of iterations between o
#Object fluid creation + Boundary condition of the fluid (field 0 is horizontal velocity; field 1 is vertical velocity; field 2 is pressure)
#Format: strong_boundaries = [(Boundary tag, Fluid field, Value)
strong_boundaries = [("Top",1,0.),("Bottom",1,0.),("Left",1,0),("Right",1,0),("Top",0,0),("Bottom",0,0),("Right",2,0),("Left",0,lambda x : .05*(1-abs(x[:, 1]))**2)]
strong_boundaries = [("Top",1,0.),("Bottom",1,0.),("Left",1,0),("Right",1,0),("Top",0,0),("Bottom",0,0),("Right",2,0),("Left",0,lambda x : 1/(20*mu)*x[:,1]*(1-x[:, 1]))]
fluid = fluid.fluid_problem("mesh.msh",g,nu*rho,rho,epsilon,strong_boundaries,1)
ii = 0
t = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment