Skip to content
Snippets Groups Projects
Commit 2e2d7450 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

little changes on extensions/demo/NavierStokesCahnHilliard

parent ff936634
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,7 @@ namespace AMDiS {
void setStokesData(double *invTauPtr, SystemVector *vec, double *nu1_=NULL, double *nu2_=NULL, double *rho1_=NULL, double *rho2_=NULL)
{
nu = new double;
(*nu) = 0.0;
invTau = invTauPtr;
solution = vec;
......
# This demo implements the Navier-Stokes-Cahn-Hilliard Benchmark from
# S. Aland, A. Voigt. Benchmark computations of diffuse-interface models for two-dimensional bubble dynamics. Int. J. Num. Meth. Fluids (2012)
output="output2_sequentiell"
initfile="init/nsch.dat.2d"
mkdir $output
......@@ -6,7 +9,7 @@ mkdir serials
cp -r ../src .
cp ../$initfile .
mpiexec -n 2 ../drivenCavity ../$initfile -ns_ksp_atol 1e-9 -ns_ksp_rtol 0 -ch_ksp_atol 1e-9 -ch_ksp_rtol 0 -laplace_pc_type hypre -laplace_pc_hypre_boomeramg_relax_type_coarse symmetric-SOR/Jacobi
mpiexec -n 2 ../nsch ../$initfile -ns_ksp_atol 1e-9 -ns_ksp_rtol 0 -ch_ksp_atol 1e-9 -ch_ksp_rtol 0 -laplace_pc_type hypre -laplace_pc_hypre_boomeramg_relax_type_coarse symmetric-SOR/Jacobi
# sequentiell (solver noch auf umfpack stellen) -> #../drivenCavity ../$initfile
###### mpiexec -n 2 valgrind --tool=memcheck -q --num-callers=20 --log-file=valgrind.log.%p ../drivenCavity ../$initfile -malloc off -start_in_debugger
......
......@@ -150,10 +150,12 @@ public:
nsProb->getProblem(0)->addVectorOperator(opNuGradC, i, &surfaceTension, &surfaceTension);
}
// < v * grad(c) , theta >
Operator *opVGradC = new Operator(chProb->getFeSpace(0), chProb->getFeSpace(1));
opVGradC->addTerm(new WorldVector_FOT(nsProb->getVelocity(), 1.0), GRD_PHI);
chProb->getProblem()->addMatrixOperator(opVGradC, 1, 1, chProb->getTau());
for (size_t i = 0; i < dow; i++) {
// < v * grad(c) , theta >
Operator *opVGradC = new Operator(chProb->getFeSpace(0), chProb->getFeSpace(1));
opVGradC->addTerm(new VecAtQP_FOT(nsProb->getSolution()->getDOFVector(i), new ID(), i), GRD_PHI);
chProb->getProblem()->addMatrixOperator(opVGradC, 1, 1, chProb->getTau());
}
/**/
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment