Commit 6532f4c8 authored by Michel Henry's avatar Michel Henry
Browse files

update fluid_problem_f

parent 40edb205
Pipeline #9504 failed with stages
in 60 minutes and 46 seconds
......@@ -215,7 +215,7 @@ static void f_boundary(WeakBoundary *wbnd, FluidProblem *problem,const double *n
double sigma = problem->ip_factor*(1+D)/(D*h)*mu*N_N;
for (int iD = 0; iD < D; ++iD) {
for (int jD = 0; jD < D; ++jD)
c_du_o_c[iD][jD] = ds[(U+iD)*D+jD] -u[iD]/c*dc[jD];
c_du_o_c[iD][jD] = ds[(U+iD)*D+jD]-u[iD]/c*dc[jD];
}
if(wbnd->type != BND_SYMMETRY && wbnd->compute_viscous_term == 1){
for (int id = 0; id < D; ++id) {
......@@ -395,7 +395,9 @@ static void fluid_problem_f(const FluidProblem *problem, const double *sol, doub
divu += du[iD][iD];
}
nold = sqrt(nold);
f0[P] = (c-cold)/dt;// + (sol[P]-solold[P])/dt*0.1;
f0[P] = 0;
f00[P*n_fields+P] = 0;
// f0[P] = (c-cold)/dt;// + (sol[P]-solold[P])/dt*0.1;
//f00[P*n_fields+P] = 1/dt*0.1;
double *g = problem->g;
double rhoreduced = (problem->reduced_gravity ? (rho-problem->rho[0]) : rho);
......@@ -403,9 +405,10 @@ static void fluid_problem_f(const FluidProblem *problem, const double *sol, doub
for (int i = 0; i < D; ++i) {
f0[U+i] =
- g[i]*rhoreduced;
// - bf[i]*c
// - bf[i]*c;
// + drag*u[i];
// f00[(U+i)*n_fields+U+i] = drag;//5.3e5;
f00[(U+i)*n_fields+U+i] = 0;//5.3e5;
if(problem->temporal) {
f0[U+i] += rho*(u[i]-uold[i])/dt;
f00[(U+i)*n_fields+U+i] += rho/dt;
......@@ -437,10 +440,10 @@ static void fluid_problem_f(const FluidProblem *problem, const double *sol, doub
f11[((U+i)*D+j)*n_fields*D+(U+i)*D+k] += supg*f01[(U+i)*n_fields*D+(U+i)*D+k];
}
double lsic = tauc*rho;
// f1[(U+i)*D+i] += divu*lsic; // je comprends pas ce terme
// for (int j = 0; j < D; ++j) {
// f11[((U+i)*D+i)*(n_fields*D)+(U+j)*D+j] += lsic;
// }
f1[(U+i)*D+i] += divu*lsic; // je comprends pas ce terme
for (int j = 0; j < D; ++j) {
f11[((U+i)*D+i)*(n_fields*D)+(U+j)*D+j] += lsic;
}
f1[P*D+i] = -u[i];
f10[(P*D+i)*n_fields+U+i] += -1;
// PSPG
......
Markdown is supported
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