Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : #include "MooseMesh.h" 13 : 14 : /** 15 : * Mesh generated from parameters 16 : */ 17 : class RinglebMesh : public MooseMesh 18 : { 19 : public: 20 : static InputParameters validParams(); 21 : 22 : RinglebMesh(const InputParameters & parameters); 23 0 : RinglebMesh(const RinglebMesh & /* other_mesh */) = default; 24 : 25 : // No copy 26 : RinglebMesh & operator=(const RinglebMesh & other_mesh) = delete; 27 : 28 : virtual std::unique_ptr<MooseMesh> safeClone() const override; 29 : 30 : virtual void buildMesh() override; 31 : 32 : // This function computes the different parameters a, rho, p and J 33 : std::vector<Real> arhopj(const Real & gamma, const std::vector<Real> & q, const int & index); 34 : 35 : // This function computes the (x,y) coordinates of the nodes 36 : // The vector `values` can be got with the `arhopj` function above 37 : std::vector<Real> computexy(const std::vector<Real> values, 38 : const int & i, 39 : const int & index, 40 : const std::vector<Real> & ks, 41 : const std::vector<Real> & q); 42 : 43 : protected: 44 : /// Gamma 45 : const Real & _gamma; 46 : 47 : /// k is a streamline parameter, i.e. k=constant on each streamline. 48 : /// kmax corresponds to the "inner" wall. Choosing a larger 49 : /// kmax leads to a more "bullet"-shaped inner wall, a smaller kmax corresponds to a more "parabolic" 50 : /// inner wall. A possible kmax value is 1.5. 51 : const Real & _kmax; 52 : 53 : /// kmin corresponds to the outer wall 54 : const Real & _kmin; 55 : 56 : /// How many points to discretize the range q = (0.5, k) into. 57 : const int & _num_q_pts; 58 : 59 : /// how many "extra" points should be inserted in the nearest element from the horizontal *in additi /// on to* the equispaced q points. 60 : const int & _n_extra_q_pts; 61 : 62 : /// how many points in the range k=(kmin, kmax). 63 : const int & _num_k_pts; 64 : 65 : /// The boundary ids to use for the ringleb mesh. 66 : const boundary_id_type _inflow_bid, _outflow_bid, _inner_wall_bid, _outer_wall_bid; 67 : 68 : /// This parameter, if true, allows to split the quadrilateral elements into triangular elements. 69 : const bool & _triangles; 70 : };