Rheolef  7.1
an efficient C++ finite element environment
oldroyd_theta_scheme1.h
Go to the documentation of this file.
1 template<class P>
27 : We(0), alpha(8./9), a(1), Re(1), delta_t(0.025), tol(1e-6), max_iter(500),
28  Th(), Xh(), Qh(), b(), c(), d(), mt(), inv_mt(), mu(), mp(), th(), thb(),
29  theta(), lambda(), eta(), nu(), c1(), c2(), c3(), c4(), c5(), stokes() {}
30 template<class P>
31 void oldroyd_theta_scheme<P>::reset(const geo& omega) {
32  Th = space (omega, "P1d", "tensor");
33  Xh = P::velocity_space (omega, "P2");
34  Qh = space (omega, "P1d");
35  theta = 1-1/sqrt(2.);
36  lambda = Re/(theta*delta_t);
37  eta = ((1 - alpha)*We + theta*delta_t)/(We + theta*delta_t);
38  nu = 1/((1-2*theta)*delta_t);
39  c1 = We/(We + theta*delta_t);
40  c2 = - We*theta*delta_t/(We + theta*delta_t);
41  c3 = alpha*theta*delta_t/(We + theta*delta_t);
42  c4 = 1/((1-2*theta)*delta_t) - 1/We;
43  c5 = alpha/We;
44  trial u (Xh), tau(Th), p (Qh);
45  test v (Xh), xi (Th), q (Qh);
46  mt = integrate (ddot(tau,xi));
47  mu = integrate (dot(u,v));
48  mp = integrate (p*q);
49  integrate_option iopt;
50  iopt.invert = true;
51  inv_mt = integrate (ddot(tau,xi), iopt);
52  b = integrate (-ddot(tau,D(v)));
53  c = integrate (lambda*dot(u,v) + 2*eta*ddot(D(u),D(v)));
54  d = integrate (-div(u)*q);
55  stokes = problem_mixed (c, d);
56  stokes.set_metric (mp);
57 }
rheolef::div
std::enable_if< details::is_field_convertible< Expr >::value,details::field_expr_v2_nonlinear_terminal_field< typename Expr::scalar_type,typename Expr::memory_type,details::differentiate_option::divergence >>::type div(const Expr &expr)
div(uh): see the expression page for the full documentation
Definition: field_expr_terminal.h:1031
bdf::alpha
Float alpha[pmax+1][pmax+1]
Definition: bdf.icc:28
mkgeo_contraction.c2
c2
Definition: mkgeo_contraction.sh:199
nu
Definition: nu.h:26
rheolef::integrate
std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr >::value &&! is_undeterminated< Result >::value, Result >::type integrate(const geo_basic< T, M > &omega, const Expr &expr, const integrate_option &iopt, Result dummy=Result())
see the integrate page for the full documentation
Definition: integrate.h:202
problem_mixed
see the problem_mixed page for the full documentation
eta
Definition: eta.h:25
space
see the space page for the full documentation
mkgeo_ball.c
c
Definition: mkgeo_ball.sh:153
p
Definition: sphere.icc:25
oldroyd_theta_scheme::reset
void reset(const geo &omega)
Definition: oldroyd_theta_scheme1.h:31
rheolef::ddot
T ddot(const tensor_basic< T > &a, const tensor_basic< T > &b)
ddot(x,y): see the expression page for the full documentation
Definition: tensor.cc:278
a
Definition: diffusion_isotropic.h:25
rheolef::details::dot
rheolef::details::is_vec dot
test
see the test page for the full documentation
u
Definition: leveque.h:25
rheolef::D
std::enable_if< details::is_field_convertible< Expr >::value,details::field_expr_v2_nonlinear_terminal_field< typename Expr::scalar_type,typename Expr::memory_type,details::differentiate_option::gradient >>::type D(const Expr &expr)
D(uh): see the expression page for the full documentation.
Definition: field_expr_terminal.h:969
mkgeo_ball.d
d
Definition: mkgeo_ball.sh:154
u
Float u(const point &x)
Definition: transmission_error.cc:26
mkgeo_ball.b
b
Definition: mkgeo_ball.sh:152
mkgeo_contraction.mu
mu
Definition: mkgeo_contraction.sh:193
trial
see the test page for the full documentation
geo
see the geo page for the full documentation
oldroyd_theta_scheme::oldroyd_theta_scheme
oldroyd_theta_scheme()
Definition: oldroyd_theta_scheme1.h:26
lambda
Definition: yield_slip_circle.h:34