diff --git a/dune/phasefield/localoperator/fem_fs_chns_monolithic.hh b/dune/phasefield/localoperator/fem_fs_chns_monolithic.hh index bdd3a978a95d5d12b47724aaa848582bdf0f22a0..2e29e5fd1755751af507ab63c597ce56443507b3 100644 --- a/dune/phasefield/localoperator/fem_fs_chns_monolithic.hh +++ b/dune/phasefield/localoperator/fem_fs_chns_monolithic.hh @@ -114,7 +114,7 @@ public: + param.vDis.eval(pf_f) * chns.v[k] * chns.vbasis.phi[i] //Velocity Dissipation in Solid ) * factor ); - // integrate mu * (grad u)^T * grad phi_i //Transpose for Viscosity + // integrate mu * (grad u)^T * grad phi_i //Transpose for Viscosity for(int dd=0; dd<dim; ++dd) r.accumulate(child(chns.vspace, k), i, param.phys.mu * (chns.jacv[dd][k] * (chns.vbasis.gradphi[i][0][dd])) * factor); } diff --git a/dune/phasefield/localoperator/fem_fs_chns_navierstokes.hh b/dune/phasefield/localoperator/fem_fs_chns_navierstokes.hh index d45856bc62b720b42d3255ded87b19a1d3cdb7b7..8db1ad6bdcf75de372cb450baf67758c4b586b1d 100644 --- a/dune/phasefield/localoperator/fem_fs_chns_navierstokes.hh +++ b/dune/phasefield/localoperator/fem_fs_chns_navierstokes.hh @@ -86,7 +86,7 @@ template<typename Param, typename CHGFS, typename CHContainer, typename NSGFS, t for (size_t i = 0; i < ns.pspace.size(); i++) { - //r.accumulate(pspace, i, -1.0 * pf_f * (v*gradphi[i][0]) * factor); + //r.accumulate(ns.pspace, i, -1.0 * pf_f * (ns.v * ns.pbasis.gradphi[i][0]) * factor); r.accumulate(ns.pspace, i, -1.0 * (pf_f*ns.div_v + (gradpf_f*ns.v)) * ns.pbasis.phi[i] * factor); } @@ -99,7 +99,7 @@ template<typename Param, typename CHGFS, typename CHContainer, typename NSGFS, t r.accumulate(child(ns.vspace, k), i, ( - rho_f_reg * (ns.v[k] - ns.vOld[k]) * ns.vbasis.phi[i] / param.time.dt //TimeEvolution + rho_f_reg * (ns.v[k] - ns.vOld[k]) * ns.vbasis.phi[i] / param.time.dt //TimeEvolution + (rho_f * v_nabla_v + Jf_nabla_v) * ns.vbasis.phi[i] //Momentum Transport //- ns.p * (pf_f * ns.vbasis.gradphi[i][0][k] + ns.vbasis.phi[i] * gradpf_f[k]) //Pressure in weak form + pf_f * (ns.gradp[k] * ns.vbasis.phi[i]) //Pressure in strong form diff --git a/src/example_2p_fs/2p_driver.hh b/src/example_2p_fs/2p_driver.hh index 452399d26f342f4c73bce80a401a778005d29941..d4465a31581797bd7c38457d67a298fb3c48c0d8 100644 --- a/src/example_2p_fs/2p_driver.hh +++ b/src/example_2p_fs/2p_driver.hh @@ -36,7 +36,7 @@ void driver_2p(Grid& grid, GV& gv, ES& es, const V_FEM& vFem, const P_FEM pFem, > Parameters; Parameters param(ptree); - TimestepManager timestepManager(ptree.sub("Time"),param.time,2); + TimestepManager timestepManager(ptree.sub("Time"), param.time, 2); //_________________________________________________________________________________________________________________________ // Make grid function spaces @@ -126,7 +126,7 @@ void driver_2p(Grid& grid, GV& gv, ES& es, const V_FEM& vFem, const P_FEM pFem, rInd0.calculateIndicator(gv, chV, false); rInd0.markGrid(grid, 2); rInd0.refineGrid(grid, chV, nsV, gfs.ch, gfs.ns, 3); - //rInd0.myRefineGrid(grid,gv, chV, nsV, gfs.ch, gfs.ns, 1); // if used with PeriodicGridView + //rInd0.myRefineGrid(grid, gv, chV, nsV, gfs.ch, gfs.ns, 1); // if used with PeriodicGridView Dune::PDELab::interpolate(initial.iniCH, gfs.ch, chV); Dune::PDELab::interpolate(initial.iniNS, gfs.ns, nsV); } @@ -157,10 +157,10 @@ void driver_2p(Grid& grid, GV& gv, ES& es, const V_FEM& vFem, const P_FEM pFem, // Linear solver typedef ISTLBackend_NOVLP_BASE_PREC_FOR_GMRES - <CH_GO, Dune::SeqILU0, Dune::RestartedGMResSolver> CH_LS; CH_LS ls_ch(chGo, 600, 200, 3, 1); + <CH_GO, Dune::SeqILU0, Dune::RestartedFlexibleGMResSolver> CH_LS; CH_LS ls_ch(chGo, 600, 200, 3, 1); typedef ISTLBackend_NOVLP_BASE_PREC_FOR_GMRES - <NS_GO, Dune::SeqILU0, Dune::RestartedGMResSolver> NS_LS; NS_LS ls_ns(nsGo, 1000, 200, 3, 1); + <NS_GO, Dune::SeqILU0, Dune::RestartedFlexibleGMResSolver> NS_LS; NS_LS ls_ns(nsGo, 1000, 200, 3, 1); // Nonlinear solver typedef Dune::PDELab::Newton<NS_GO, NS_LS, NS_V> PDESolver1; @@ -203,7 +203,7 @@ void driver_2p(Grid& grid, GV& gv, ES& es, const V_FEM& vFem, const P_FEM pFem, rInd.calculateIndicator(gv, chV, false); rInd.markGrid(grid, 2); rInd.refineGrid(grid, chV, chVOld, nsV, nsVOld, gfs.ch, gfs.ns, 3); - //rInd.myRefineGrid(grid, gv, chV, chVOld, nsV, nsVOld, gfs.ch, gfs.ns, 1); //For PeriodicGridView + //rInd.myRefineGrid(grid, gv, chV, chVOld, nsV, nsVOld, gfs.ch, gfs.ns, 1); // if used with PeriodicGridView // recompute constraints gfs.updateConstraintsContainer(bdry); diff --git a/src/example_2p_fs_monolithic/2p_driver.hh b/src/example_2p_fs_monolithic/2p_driver.hh index 1317e08e00fc60dacf5daca0698f216992d69775..07833bd1126fff02c8cb0c3ef0789938c7e0a88b 100644 --- a/src/example_2p_fs_monolithic/2p_driver.hh +++ b/src/example_2p_fs_monolithic/2p_driver.hh @@ -35,7 +35,7 @@ void driver_2p(Grid& grid, GV& gv, ES& es, const V_FEM& vFem, const P_FEM pFem, > Parameters; Parameters param(ptree); - TimestepManager timestepManager(ptree.sub("Time"),param.time,2); + TimestepManager timestepManager(ptree.sub("Time"), param.time, 2); //_________________________________________________________________________________________________________________________ // Make grid function spaces @@ -117,7 +117,7 @@ void driver_2p(Grid& grid, GV& gv, ES& es, const V_FEM& vFem, const P_FEM pFem, rInd0.calculateIndicator(gv, chnsV, false); rInd0.markGrid(grid, 2); rInd0.refineGridCHNS(grid, chnsV, gfs.chns, 3); - //rInd0.myRefineGridCH(grid, chnsV, gfs.chns, 1); // if used with PeriodicGridView + //rInd0.myRefineGrid(grid, gv, chnsV, gfs.chns, 1); // if used with PeriodicGridView Dune::PDELab::interpolate(initial.iniCHNS, gfs.chns, chnsV); } @@ -178,7 +178,7 @@ void driver_2p(Grid& grid, GV& gv, ES& es, const V_FEM& vFem, const P_FEM pFem, rInd.calculateIndicator(gv, chnsV, false); rInd.markGrid(grid, 2); rInd.refineGridCHNS_CHNSOld(grid, chnsV, chnsVOld, gfs.chns, 3); - //rInd.myRefineGridCH_CHOld(grid, chnsV, chnsVOld, gfs.chns, 1); //For PeriodicGridView + //rInd.myRefineGrid(grid, gv, chnsV, chnsVOld, gfs.chns, 1); // if used with PeriodicGridView // recompute constraints gfs.updateConstraintsContainer(bdry);