Commit 86d4fb24 authored by Matthieu Constant's avatar Matthieu Constant
Browse files

correction dc dq

parent 74300d54
......@@ -285,7 +285,7 @@ static void fluid_problem_assemble_system(FluidProblem *problem, double *rhs, co
for (int i = 0; i< N_SF; ++i) {
for (int j = 0; j < DIMENSION; ++j) {
dq[j] += dphi[i][j]*solution[el[i]*n_fields+Q];
dcdq[j] += dphi[i][j];
dqdq[j] += dphi[i][j];
for (int k = 0; k < DIMENSION; ++k)
du[k][j] += dphi[i][j]*solution[el[i]*n_fields+k+ff*(DIMENSION+1)];
}
......@@ -347,7 +347,7 @@ static void fluid_problem_assemble_system(FluidProblem *problem, double *rhs, co
double udtau = 0;
double dphiidtau = 0;
for (int j = 0; j < DIMENSION; ++j) {
dtau[j] = dphij[j]-phij*dc[j]/q;
dtau[j] = dphij[j]-phij*dq[j]/q;
dphiidphij += dphii[j]*dphij[j];
udtau += u[j]*dtau[j];
dphiidtau += dphii[j]*dtau[j];
......@@ -362,8 +362,8 @@ static void fluid_problem_assemble_system(FluidProblem *problem, double *rhs, co
for (int k = 0; k < DIMENSION; ++k) {
int V = k;
utau += u[k]*tau[j][k];
dutaudq += u[k]*u[j]*(dc[k]*phij/(q*q)-dcdq[k]/q);
dphisigmadq += 2*mu[ff]*dphii[k]*0.5*(u[k]*dc[j]*phij/(q*q)+u[j]*dc[k]*phij/(q*q)-u[k]*dcdq[j]/q-u[j]*dcdq[k]/q);
dutaudq += u[k]*u[j]*(dq[k]*phij/(q*q)-dqdq[k]/q);
dphisigmadq += 2*mu[ff]*dphii[k]*0.5*(u[k]*dq[j]*phij/(q*q)+u[j]*dq[k]*phij/(q*q)-u[k]*dqdq[j]/q-u[j]*dqdq[k]/q);
//LOCAL_MATRIX(U,V) += -jw*rho*u[j]*dphii[k]*phij/c+jw*2*mu*dphii[k]*dtau[j]*0.5;
LOCAL_MATRIX(U,V) +=
jw*rho[ff]*phii*phij*tau[j][k]/q
......
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