30 #include "libmesh/const_function.h"
31 #include "libmesh/fem_context.h"
32 #include "libmesh/dirichlet_boundaries.h"
33 #include "libmesh/dof_map.h"
34 #include "libmesh/fem_system.h"
47 std::string var_str =
"Physics/"+
_physics_name+
"/bc_variables";
50 this->
read_bc_data( input, id_str, bc_str, var_str, val_str );
64 if( bc_type ==
"isothermal_wall" )
67 else if( bc_type ==
"adiabatic_wall" )
70 else if( bc_type ==
"prescribed_heat_flux" )
73 else if( bc_type ==
"general_heat_flux" )
76 else if( bc_type ==
"axisymmetric" )
82 std::cerr <<
"==========================================================" << std::endl
83 <<
"Error: Invalid bc_type " << bc_type << std::endl
85 <<
"==========================================================" << std::endl;
98 const std::string& bc_id_string,
100 const std::string& bc_vars,
101 const std::string& bc_value,
102 const GetPot& input )
129 libMesh::RealGradient q_in;
131 int num_q_components = input.vector_variable_size(
"Physics/"+
_physics_name+
"/q_wall_"+bc_id_string);
133 for(
int i = 0; i < num_q_components; i++ )
135 q_in(i) = input(
"Physics/"+
_physics_name+
"/q_wall_"+bc_id_string, 0.0, i );
150 bc_vars, bc_value, input );
159 const bool request_jacobian,
161 const BCType bc_type )
const
189 std::cerr <<
"Error: Invalid Neumann BC type for " <<
_physics_name
198 libMesh::DofMap& dof_map,
206 std::set<BoundaryID> dbc_ids;
207 dbc_ids.insert(bc_id);
209 std::vector<VariableIndex> dbc_vars;
210 dbc_vars.push_back(
_T_var);
214 libMesh::DirichletBoundary t_dbc( dbc_ids, dbc_vars, &t_func );
216 dof_map.add_dirichlet_boundary( t_dbc );
221 std::cerr <<
"Error: Invalid Dirichlet BC type for " <<
_physics_name
virtual void read_bc_data(const GetPot &input, const std::string &id_str, const std::string &bc_str, const std::string &var_str, const std::string &val_str)
virtual int string_to_int(const std::string &bc_type_in) const
virtual void init_bc_types(const GRINS::BoundaryID bc_id, const std::string &bc_id_string, const int bc_type, const std::string &bc_vars, const std::string &bc_value, const GetPot &input)
libMesh::boundary_id_type BoundaryID
More descriptive name of the type used for boundary ids.
~AxisymmetricHeatTransferBCHandling()
virtual void init_bc_data(const libMesh::FEMSystem &system)
Override this method to initialize any system-dependent data.
std::tr1::shared_ptr< GRINS::NeumannFuncObj > get_neumann_bound_func(GRINS::BoundaryID bc_id, GRINS::VariableIndex var_id) const
void apply_neumann_axisymmetric(AssemblyContext &context, const VariableIndex var, const libMesh::Real sign, const typename libMesh::TensorTools::IncrementRank< FEShape >::type &value) const
Applies Neumann boundary conditions for the constant case.
void set_dirichlet_bc_value(GRINS::BoundaryID bc_id, libMesh::Real value, int component=0)
void set_neumann_bc_value(GRINS::BoundaryID bc_id, const libMesh::Point &q_in)
const libMesh::Point & get_neumann_bc_value(GRINS::BoundaryID bc_id) const
const std::string T_var_name_default
temperature
virtual void user_apply_neumann_bcs(AssemblyContext &context, const GRINS::CachedValues &cache, const bool request_jacobian, const GRINS::BoundaryID bc_id, const GRINS::BCType bc_type) const
virtual void init_bc_types(const GRINS::BoundaryID bc_id, const std::string &bc_id_string, const int bc_type, const std::string &bc_vars, const std::string &bc_value, const GetPot &input)
virtual void user_init_dirichlet_bcs(libMesh::FEMSystem *system, libMesh::DofMap &dof_map, GRINS::BoundaryID bc_id, GRINS::BCType bc_type) const
AxisymmetricHeatTransferBCHandling()
GRINS::BoundaryConditions _bound_conds
Object that stashes generic boundary condition types.
Base class for reading and handling boundary conditions for physics classes.
void set_neumann_bc_type(GRINS::BoundaryID bc_id, int bc_type)
void set_dirichlet_bc_type(GRINS::BoundaryID bc_id, int bc_type)
libMesh::Real get_dirichlet_bc_value(GRINS::BoundaryID bc_id, int component=0) const
std::string _physics_name