From 663c41ed8a70f5df9d580704ad1c9930d9021e16 Mon Sep 17 00:00:00 2001 From: Lars von Wolff <lars.von-wolff@ians.uni-stuttgart.de> Date: Mon, 12 Apr 2021 14:29:38 +0200 Subject: [PATCH] Ready for first test of thinstrip_full second example --- src/paper_thinstrip_full/chns_hyperbolic.ini | 75 +++++++++++++++++++ .../thinstrip_boundary.hh | 2 +- .../thinstrip_full_chns_monolithic.hh | 8 ++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 src/paper_thinstrip_full/chns_hyperbolic.ini diff --git a/src/paper_thinstrip_full/chns_hyperbolic.ini b/src/paper_thinstrip_full/chns_hyperbolic.ini new file mode 100644 index 0000000..bcab18a --- /dev/null +++ b/src/paper_thinstrip_full/chns_hyperbolic.ini @@ -0,0 +1,75 @@ +[Physics] +uAst = 1 +D = 0.02 +rho1 = 1.0 +rho2 = 1.0 +mu=0.005 +ReactionRate=0.5 +#ReactionLimiter = 1000 +SurfaceTensionScaling=0.1 +VelDissipationRate = 1000 +#VelDissipationMax = 0.9 +CurvatureAlpha=0.001 + +[domain] +level = 0 +filename = grids/tper1.msh +len = 1 +periodic = 01 +#YScalingFactor = 0.5 +YScaling = 1 #0.125 + +[output] +filename = output1 + +[Phasefield] +eps=0.03 #0.03 +delta=0.03 #0.03 +DoubleWellDelta=0.05 #0.05 +Mobility=0.04 +Sigma1=1 +Sigma2=1 +Sigma3=1 + +[Time] +tMax = 1 +dt = 0.0015 +dtMax = 0.01 +dtMin = 0.00015 +#saveintervall = 0.5 +#dtIncreaseFactor=1.2 +#dtDecreaseFactor=0.5 + +[Initial] +# FlowVyy= 10# pConst/(Domain_width * mu) +pConst=0.05 #0.1 +uConst=0.5 #0.5 +uInflow=0.3 #0.3 + +[RefinementInitial] +etaRefine = 0.2 +etaCoarsen = 0.18 +maxRefineLevel = 4 +minRefineLevel = -1 + +[Refinement] +etaRefine = 0.2 +etaCoarsen = 0.1 +maxRefineLevel = 4 +minRefineLevel = -1 + +[NS_Newton] +ReassembleThreshold = 0.0 +LineSearchMaxIterations = 30 +MaxIterations = 20 +AbsoluteLimit = 1e-9 +Reduction = 1e-7 +VerbosityLevel = 2 + +[Phasefield_Newton] +ReassembleThreshold = 0.0 +LineSearchMaxIterations = 30 +MaxIterations = 100 +AbsoluteLimit = 1e-9 +Reduction = 1e-7 +VerbosityLevel = 2 diff --git a/src/paper_thinstrip_full/thinstrip_boundary.hh b/src/paper_thinstrip_full/thinstrip_boundary.hh index 34b36a2..3bb7659 100644 --- a/src/paper_thinstrip_full/thinstrip_boundary.hh +++ b/src/paper_thinstrip_full/thinstrip_boundary.hh @@ -97,7 +97,7 @@ public: inline void evaluateGlobal(const typename Traits::DomainType & x, typename Traits::RangeType & y) const { //RF x_nondim = x[1]/pref.YScaling; - RF d_sine = 0.15*sin(x[0]*2*M_PI); + RF d_sine = 0;//0.15*sin(x[0]*2*M_PI); RF rf = pref.tw.dw.eval_shape(1/eps*(x[1] - dSolid*pref.YScaling)); RF rf2 = pref.tw.dw.eval_shape(1/eps*(x[1] - (dSolid + d1+d_sine)*pref.YScaling)); if(Phase == 1) diff --git a/src/paper_thinstrip_full/thinstrip_full_chns_monolithic.hh b/src/paper_thinstrip_full/thinstrip_full_chns_monolithic.hh index 0373565..af534db 100644 --- a/src/paper_thinstrip_full/thinstrip_full_chns_monolithic.hh +++ b/src/paper_thinstrip_full/thinstrip_full_chns_monolithic.hh @@ -80,6 +80,13 @@ public: RF rho_f=param.phys.rho_f(chns.pf,chns.pf2); RF rho_f_reg = rho_f + (param.phys.rho_1+param.phys.rho_2)*param.delta; + RF source = 0; + Dune::FieldVector<RF, dim> xg = eg.geometry().global( ip.position() ); + if(xg[0] > 0.1 && xg[0] < 0.3) + { + source = (xg[0]-0.1)*(0.3-xg[0])/0.04; + } + for (size_t i=0; i<chns.pfspace.size(); i++) { //RF Rspeed = std::max(param.tw.eval_q(ch.pf,ch.pf2,pf3) - 0.1, 0.0); @@ -135,6 +142,7 @@ public: + (pf_c*(chns.u-param.phys.uAst)*chns.div_v //TODO v or vOld + (chns.u-param.phys.uAst)*(chns.gradpf*chns.v) + pf_c*(chns.gradu*chns.v) )*chns.basis.phi[i] + - pf_c )); } // for i -- GitLab