|
string | generate_weakly_compressible_navier_stokes_element.mode = "c" |
| Settings explanation DIMENSION TO COMPUTE: This symbolic generator is valid for both 2D and 3D cases. More...
|
|
bool | generate_weakly_compressible_navier_stokes_element.do_simplifications = False |
|
string | generate_weakly_compressible_navier_stokes_element.dim_to_compute = "Both" |
|
bool | generate_weakly_compressible_navier_stokes_element.divide_by_rho = True |
|
bool | generate_weakly_compressible_navier_stokes_element.ASGS_stabilization = True |
|
string | generate_weakly_compressible_navier_stokes_element.formulation = "WeaklyCompressibleNavierStokes" |
|
bool | generate_weakly_compressible_navier_stokes_element.darcy_term = True |
|
bool | generate_weakly_compressible_navier_stokes_element.convective_term = True |
|
bool | generate_weakly_compressible_navier_stokes_element.artificial_compressibility = True |
|
string | generate_weakly_compressible_navier_stokes_element.linearisation = "Picard" |
|
string | generate_weakly_compressible_navier_stokes_element.output_filename = "weakly_compressible_navier_stokes.cpp" |
|
string | generate_weakly_compressible_navier_stokes_element.template_filename = "weakly_compressible_navier_stokes_cpp_template.cpp" |
|
string | generate_weakly_compressible_navier_stokes_element.err_msg = "Wrong formulation. Given \'" + formulation + "\'. Available options are \'WeaklyCompressibleNavierStokes\' and \'Stokes\'." |
|
string | generate_weakly_compressible_navier_stokes_element.info_msg = "\n" |
|
list | generate_weakly_compressible_navier_stokes_element.dim_vector = [2] |
|
list | generate_weakly_compressible_navier_stokes_element.nnodes_vector = [3] |
|
| generate_weakly_compressible_navier_stokes_element.templatefile = open(template_filename) |
| Initialize the outstring to be filled with the template .cpp file. More...
|
|
| generate_weakly_compressible_navier_stokes_element.outstring = templatefile.read() |
| Replace the computed RHS and LHS in the template outstring. More...
|
|
int | generate_weakly_compressible_navier_stokes_element.strain_size = 3 |
|
bool | generate_weakly_compressible_navier_stokes_element.impose_partion_of_unity = False |
|
| generate_weakly_compressible_navier_stokes_element.N |
|
| generate_weakly_compressible_navier_stokes_element.DN |
|
| generate_weakly_compressible_navier_stokes_element.v = DefineMatrix('v',nnodes,dim) |
| Unknown fields definition. More...
|
|
| generate_weakly_compressible_navier_stokes_element.vn = DefineMatrix('vn',nnodes,dim) |
|
| generate_weakly_compressible_navier_stokes_element.vnn = DefineMatrix('vnn',nnodes,dim) |
|
| generate_weakly_compressible_navier_stokes_element.p = DefineVector('p',nnodes) |
|
| generate_weakly_compressible_navier_stokes_element.pn = DefineVector('pn',nnodes) |
|
| generate_weakly_compressible_navier_stokes_element.pnn = DefineVector('pnn',nnodes) |
|
| generate_weakly_compressible_navier_stokes_element.rho_nodes = DefineVector('rho',nnodes) |
| Fluid properties. More...
|
|
| generate_weakly_compressible_navier_stokes_element.c_nodes = DefineVector('c',nnodes) |
|
| generate_weakly_compressible_navier_stokes_element.rho = rho_nodes.transpose()*N |
|
| generate_weakly_compressible_navier_stokes_element.c = c_nodes.transpose()*N |
|
| generate_weakly_compressible_navier_stokes_element.w = DefineMatrix('w',nnodes,dim) |
| Test functions definition. More...
|
|
| generate_weakly_compressible_navier_stokes_element.q = DefineVector('q',nnodes) |
|
| generate_weakly_compressible_navier_stokes_element.f = DefineMatrix('f',nnodes,dim) |
| Other data definitions. More...
|
|
| generate_weakly_compressible_navier_stokes_element.C = DefineSymmetricMatrix('C',strain_size,strain_size) |
| Constitutive matrix definition. More...
|
|
| generate_weakly_compressible_navier_stokes_element.stress = DefineVector('stress',strain_size) |
| Stress vector definition. More...
|
|
| generate_weakly_compressible_navier_stokes_element.dt = sympy.Symbol('dt', positive = True) |
| Other simbols definition. More...
|
|
| generate_weakly_compressible_navier_stokes_element.mu = sympy.Symbol('mu', positive = True) |
|
| generate_weakly_compressible_navier_stokes_element.h = sympy.Symbol('h', positive = True) |
|
| generate_weakly_compressible_navier_stokes_element.dyn_tau = sympy.Symbol('dyn_tau', positive = True) |
|
| generate_weakly_compressible_navier_stokes_element.stab_c1 = sympy.Symbol('stab_c1', positive = True) |
|
| generate_weakly_compressible_navier_stokes_element.stab_c2 = sympy.Symbol('stab_c2', positive = True) |
|
| generate_weakly_compressible_navier_stokes_element.gauss_weight = sympy.Symbol('gauss_weight', positive = True) |
|
bool | generate_weakly_compressible_navier_stokes_element.sigma = sympy.Symbol('sigma', positive = True) if darcy_term else 0.0 |
| Symbols for Darcy term. More...
|
|
bool | generate_weakly_compressible_navier_stokes_element.stab_c3 = sympy.Symbol('stab_c3', positive = True) if darcy_term else 0.0 |
|
| generate_weakly_compressible_navier_stokes_element.bdf0 = sympy.Symbol('bdf0') |
| Backward differences coefficients. More...
|
|
| generate_weakly_compressible_navier_stokes_element.bdf1 = sympy.Symbol('bdf1') |
|
| generate_weakly_compressible_navier_stokes_element.bdf2 = sympy.Symbol('bdf2') |
|
| generate_weakly_compressible_navier_stokes_element.f_gauss = f.transpose()*N |
| Data interpolation to the Gauss points. More...
|
|
| generate_weakly_compressible_navier_stokes_element.v_gauss = v.transpose()*N |
|
| generate_weakly_compressible_navier_stokes_element.vconv = DefineMatrix('vconv',nnodes,dim) |
| Convective velocity definition. More...
|
|
| generate_weakly_compressible_navier_stokes_element.vmesh = DefineMatrix('vmesh',nnodes,dim) |
|
| generate_weakly_compressible_navier_stokes_element.vconv_gauss = vconv.transpose()*N |
|
float | generate_weakly_compressible_navier_stokes_element.stab_norm_a = 0.0 |
| Compute the stabilization parameters. More...
|
|
float | generate_weakly_compressible_navier_stokes_element.tau1 = 1.0/(rho*dyn_tau/dt + stab_c2*rho*stab_norm_a/h + stab_c1*mu/h**2 + stab_c3*sigma/h**2) |
|
| generate_weakly_compressible_navier_stokes_element.tau2 = mu + (stab_c2*rho*stab_norm_a*h + stab_c3*sigma)/stab_c1 |
|
tuple | generate_weakly_compressible_navier_stokes_element.accel_gauss = (bdf0*v + bdf1*vn + bdf2*vnn).transpose()*N |
| Compute the rest of magnitudes at the Gauss points. More...
|
|
| generate_weakly_compressible_navier_stokes_element.p_gauss = p.transpose()*N |
|
tuple | generate_weakly_compressible_navier_stokes_element.pder_gauss = (bdf0*p + bdf1*pn + bdf2*pnn).transpose()*N |
|
| generate_weakly_compressible_navier_stokes_element.w_gauss = w.transpose()*N |
|
| generate_weakly_compressible_navier_stokes_element.q_gauss = q.transpose()*N |
|
| generate_weakly_compressible_navier_stokes_element.grad_w = DfjDxi(DN,w) |
| Gradients computation (fluid dynamics gradient) More...
|
|
| generate_weakly_compressible_navier_stokes_element.grad_q = DfjDxi(DN,q) |
|
| generate_weakly_compressible_navier_stokes_element.grad_p = DfjDxi(DN,p) |
|
| generate_weakly_compressible_navier_stokes_element.grad_v = DfjDxi(DN,v) |
|
| generate_weakly_compressible_navier_stokes_element.grad_rho = DfjDxi(DN,rho_nodes) |
|
| generate_weakly_compressible_navier_stokes_element.div_w = div(DN,w) |
|
| generate_weakly_compressible_navier_stokes_element.div_v = div(DN,v) |
|
| generate_weakly_compressible_navier_stokes_element.div_vconv = div(DN,vconv) |
|
| generate_weakly_compressible_navier_stokes_element.grad_sym_v = grad_sym_voigtform(DN,v) |
|
| generate_weakly_compressible_navier_stokes_element.grad_w_voigt = grad_sym_voigtform(DN,w) |
|
tuple | generate_weakly_compressible_navier_stokes_element.convective_term_gauss = (vconv_gauss.transpose()*grad_v) |
|
| generate_weakly_compressible_navier_stokes_element.rho_convective_term_gauss = vconv_gauss.transpose()*grad_rho |
|
tuple | generate_weakly_compressible_navier_stokes_element.rv_galerkin = rho*w_gauss.transpose()*f_gauss - rho*w_gauss.transpose()*accel_gauss - grad_w_voigt.transpose()*stress + div_w*p_gauss - sigma*w_gauss.transpose()*v_gauss - q_gauss*div_v |
| Compute galerkin functional Navier-Stokes functional. More...
|
|
tuple | generate_weakly_compressible_navier_stokes_element.vel_residual = rho*f_gauss - rho*accel_gauss - grad_p - sigma*v_gauss |
| Stabilization functional terms Momentum conservation residual Note that the viscous stress term is dropped since linear elements are used. More...
|
|
| generate_weakly_compressible_navier_stokes_element.mas_residual = -div_v |
|
float | generate_weakly_compressible_navier_stokes_element.vel_subscale = tau1*vel_residual |
|
| generate_weakly_compressible_navier_stokes_element.mas_subscale = tau2*mas_residual |
|
float | generate_weakly_compressible_navier_stokes_element.rv_stab = grad_q.transpose()*vel_subscale |
|
tuple | generate_weakly_compressible_navier_stokes_element.rv = rv_galerkin + rv_stab |
| Add the stabilization terms to the original residual terms. More...
|
|
| generate_weakly_compressible_navier_stokes_element.dofs = sympy.zeros(nnodes*(dim+1), 1) |
| Define DOFs and test function vectors. More...
|
|
| generate_weakly_compressible_navier_stokes_element.testfunc = sympy.zeros(nnodes*(dim+1), 1) |
|
| generate_weakly_compressible_navier_stokes_element.rhs = Compute_RHS(rv.copy(), testfunc, do_simplifications) |
| Compute LHS and RHS For the RHS computation one wants the residual of the previous iteration (residual based formulation). More...
|
|
| generate_weakly_compressible_navier_stokes_element.rhs_out = OutputVector_CollectingFactors(gauss_weight*rhs, "rRHS", mode, assignment_op='+=') |
|
| generate_weakly_compressible_navier_stokes_element.lhs = Compute_LHS(rhs, testfunc, dofs, do_simplifications) |
|
| generate_weakly_compressible_navier_stokes_element.lhs_out = OutputMatrix_CollectingFactors(gauss_weight*lhs, "rLHS", mode, assignment_op='+=') |
|
| generate_weakly_compressible_navier_stokes_element.out = open(output_filename,'w') |
| Write the modified template. More...
|
|