Loading...
Searching...
No Matches
oldroyd_theta_scheme3.h
Go to the documentation of this file.
template <class P>
void oldroyd_theta_scheme<P>::sub_step1 (
const field& tau_h0, const field& uh0, const field& ph0,
field& tau_h, field& uh, field& ph) const
{
update_transport_stress (uh0);
field gamma_h = inv_mt*(th*tau_h0 - thb);
test v (Xh), xi (Th);
field lh = lambda*integrate (dot(uh0,v))
+ b*(c1*tau_h0 + c2*gamma_h);
ph = ph0;
uh.set_u() = uh0.u();
stokes.solve (lh, field(Qh,0), uh, ph);
field Duh = inv_mt*integrate(ddot(D(uh),xi));
tau_h = c1*tau_h0 + c2*gamma_h + 2*c3*Duh;
}
template <class P>
void oldroyd_theta_scheme<P>::sub_step2 (
const field& uh0,
const field& tau_h1, const field& uh1,
field& tau_h, field& uh) const
{
uh = (1-theta)/theta*uh1 - (1-2*theta)/theta*uh0;
test xi (Th);
if (We == 0) {
field Duh = inv_mt*integrate(ddot(D(uh),xi));
tau_h = 2*alpha*Duh;
return;
}
update_transport_stress (uh);
form th_nu = th + nu*mt;
typename P::tau_upstream tau_up (Th.get_geo(), We, alpha);
field lh = integrate (ddot(c4*tau_h1 + 2*c5*D(uh1),xi))
+ integrate ("boundary",
max(0, -dot(uh,normal()))*ddot(tau_up,xi));
problem transport (th_nu);
transport.solve (lh, tau_h);
}
template <class P>
void
oldroyd_theta_scheme<P>::update_transport_stress (const field& uh) const {
typename P::tau_upstream tau_up (Th.get_geo(), We, alpha);
trial tau (Th); test xi (Th);
auto ma = 0.5*((1-a)*grad(uh) - (1+a)*trans(grad(uh)));
auto beta_a = tau*ma + trans(ma)*tau;
th = integrate (ddot(grad_h(tau)*uh + beta_a,xi))
+ integrate ("boundary", max(0, -dot(uh,normal()))*ddot(tau,xi))
+ integrate ("internal_sides",
- dot(uh,normal())*ddot(jump(tau),average(xi))
+ 0.5*abs(dot(uh,normal()))*ddot(jump(tau),jump(xi)));
thb = integrate ("boundary", max(0, -dot(uh,normal()))*ddot(tau_up,xi));
}
lh
field lh(Float epsilon, Float t, const test &v)
Definition burgers_diffusion_operators.icc:25
field
see the field page for the full documentation
form
see the form page for the full documentation
problem
see the problem page for the full documentation
test
see the test page for the full documentation
trial
see the test page for the full documentation
oldroyd_theta_scheme::c4
Float c4
Definition oldroyd_theta_scheme.h:49
oldroyd_theta_scheme::inv_mt
form inv_mt
Definition oldroyd_theta_scheme.h:46
oldroyd_theta_scheme::th
form th
Definition oldroyd_theta_scheme.h:47
oldroyd_theta_scheme::theta
Float theta
Definition oldroyd_theta_scheme.h:49
oldroyd_theta_scheme::a
Float a
Definition oldroyd_theta_scheme.h:42
oldroyd_theta_scheme::c3
Float c3
Definition oldroyd_theta_scheme.h:49
oldroyd_theta_scheme::We
Float We
Definition oldroyd_theta_scheme.h:42
oldroyd_theta_scheme::mt
form mt
Definition oldroyd_theta_scheme.h:46
oldroyd_theta_scheme::Xh
space Xh
Definition oldroyd_theta_scheme.h:45
oldroyd_theta_scheme::c2
Float c2
Definition oldroyd_theta_scheme.h:49
oldroyd_theta_scheme::stokes
problem_mixed stokes
Definition oldroyd_theta_scheme.h:50
oldroyd_theta_scheme::sub_step1
void sub_step1(const field &tau_h0, const field &uh0, const field &ph0, field &tau_h, field &uh, field &ph) const
Definition oldroyd_theta_scheme3.h:26
oldroyd_theta_scheme::thb
field thb
Definition oldroyd_theta_scheme.h:48
oldroyd_theta_scheme::lambda
Float lambda
Definition oldroyd_theta_scheme.h:49
oldroyd_theta_scheme::alpha
Float alpha
Definition oldroyd_theta_scheme.h:42
oldroyd_theta_scheme::nu
Float nu
Definition oldroyd_theta_scheme.h:49
oldroyd_theta_scheme::c1
Float c1
Definition oldroyd_theta_scheme.h:49
oldroyd_theta_scheme::b
form b
Definition oldroyd_theta_scheme.h:46
oldroyd_theta_scheme::Th
space Th
Definition oldroyd_theta_scheme.h:45
oldroyd_theta_scheme::Qh
space Qh
Definition oldroyd_theta_scheme.h:45
oldroyd_theta_scheme::c5
Float c5
Definition oldroyd_theta_scheme.h:49
oldroyd_theta_scheme::update_transport_stress
void update_transport_stress(const field &uh) const
Definition oldroyd_theta_scheme3.h:65
oldroyd_theta_scheme::sub_step2
void sub_step2(const field &uh0, const field &tau_h1, const field &uh1, field &tau_h, field &uh) const
Definition oldroyd_theta_scheme3.h:42