From 5478df0f0897ed7ac3dd3a3de1785a7948c75cfe Mon Sep 17 00:00:00 2001 From: Cody Permann Date: Thu, 22 Jul 2010 16:12:09 +0000 Subject: [PATCH] Initial Boundary Penetration Detection r2099 --- framework/include/auxkernels/PenetrationAux.h | 35 +++++ framework/include/utils/PenetrationLocator.h | 32 +++++ framework/src/auxkernels/ConstantAux.C | 2 +- framework/src/auxkernels/PenetrationAux.C | 27 ++++ framework/src/materials/MaterialWarehouse.C | 16 ++- framework/src/utils/PenetrationLocator.C | 134 ++++++++++++++++++ test/src/base/MooseTest.C | 6 +- .../penetration_locator_test/2dcontact.e | Bin 0 -> 4544 bytes .../2dcontact_collide.e | Bin 0 -> 7268 bytes .../tests/penetration_locator_test/gold/out.e | Bin 0 -> 12148 bytes .../penetration_locator_test.i | 97 +++++++++++++ .../penetration_locator_test.py | 4 + 12 files changed, 347 insertions(+), 6 deletions(-) create mode 100644 framework/include/auxkernels/PenetrationAux.h create mode 100644 framework/include/utils/PenetrationLocator.h create mode 100644 framework/src/auxkernels/PenetrationAux.C create mode 100644 framework/src/utils/PenetrationLocator.C create mode 100644 test/tests/penetration_locator_test/2dcontact.e create mode 100644 test/tests/penetration_locator_test/2dcontact_collide.e create mode 100644 test/tests/penetration_locator_test/gold/out.e create mode 100644 test/tests/penetration_locator_test/penetration_locator_test.i create mode 100644 test/tests/penetration_locator_test/penetration_locator_test.py diff --git a/framework/include/auxkernels/PenetrationAux.h b/framework/include/auxkernels/PenetrationAux.h new file mode 100644 index 000000000000..a30157e02b53 --- /dev/null +++ b/framework/include/auxkernels/PenetrationAux.h @@ -0,0 +1,35 @@ +#ifndef PENETRATIONAUX_H +#define PENETRATIONAUX_H + +#include "AuxKernel.h" +#include "PenetrationLocator.h" + + +//Forward Declarations +class PenetrationAux; + +template<> +InputParameters validParams(); + +/** + * Constant auxiliary value + */ +class PenetrationAux : public AuxKernel +{ +public: + + /** + * Factory constructor, takes parameters so that all derived classes can be built using the same + * constructor. + */ + PenetrationAux(std::string name, MooseSystem & moose_system, InputParameters parameters); + + virtual ~PenetrationAux() {} + +protected: + virtual Real computeValue(); + + PenetrationLocator _penetration_locator; +}; + +#endif //PENETRATIONAUX_H diff --git a/framework/include/utils/PenetrationLocator.h b/framework/include/utils/PenetrationLocator.h new file mode 100644 index 000000000000..316fa2dbca92 --- /dev/null +++ b/framework/include/utils/PenetrationLocator.h @@ -0,0 +1,32 @@ +#ifndef PENETRATIONLOCATOR_H +#define PENETRATIONLOCATOR_H + +#include "libmesh_common.h" + +#include +#include + +#include "mesh.h" + +class PenetrationLocator +{ +public: + + PenetrationLocator(Mesh & mesh, short int master, short int slave); + void detectPenetration(); + + Real penetrationDistance(unsigned int node_id) const; + +private: + + Real normDistance(const Elem & side, const Point & p0); + + Mesh & _mesh; + short int _master_boundary; + short int _slave_boundary; + + std::map > _penetrated_elems; +}; + + +#endif //PENETRATIONLOCATOR_H diff --git a/framework/src/auxkernels/ConstantAux.C b/framework/src/auxkernels/ConstantAux.C index 07b7851c4f1e..6cb0696b983c 100644 --- a/framework/src/auxkernels/ConstantAux.C +++ b/framework/src/auxkernels/ConstantAux.C @@ -4,7 +4,7 @@ template<> InputParameters validParams() { InputParameters params = validParams(); - params.set("value")=0.0; + params.addParam("value", 0.0, "Some constant value that can be read from the input file"); return params; } diff --git a/framework/src/auxkernels/PenetrationAux.C b/framework/src/auxkernels/PenetrationAux.C new file mode 100644 index 000000000000..d5af97c4f64a --- /dev/null +++ b/framework/src/auxkernels/PenetrationAux.C @@ -0,0 +1,27 @@ +#include "PenetrationAux.h" +#include "MooseSystem.h" + +#include "mesh.h" + +template<> +InputParameters validParams() +{ + InputParameters params = validParams(); + params.addRequiredParam("master", "The boundary which will penetrate"); + params.addRequiredParam("slave", "The boundary to be penetrated"); + return params; +} + +PenetrationAux::PenetrationAux(std::string name, MooseSystem & moose_system, InputParameters parameters) + :AuxKernel(name, moose_system, parameters), + _penetration_locator(*moose_system.getMesh(), parameters.get("master"), parameters.get("slave")) +{ + // For now we are working with meshes that do not move which means we can detect penetration once! + _penetration_locator.detectPenetration(); +} + +Real +PenetrationAux::computeValue() +{ + return _penetration_locator.penetrationDistance(_current_node->id()); +} diff --git a/framework/src/materials/MaterialWarehouse.C b/framework/src/materials/MaterialWarehouse.C index f287fd505bcd..8a1961494136 100644 --- a/framework/src/materials/MaterialWarehouse.C +++ b/framework/src/materials/MaterialWarehouse.C @@ -27,20 +27,28 @@ MaterialWarehouse::~MaterialWarehouse() std::vector MaterialWarehouse::getMaterials(THREAD_ID tid, unsigned int block_id) { + std::stringstream oss; + MaterialIterator mat_iter = _active_materials[tid].find(block_id); if (mat_iter == _active_materials[tid].end()) - mooseError("Active Material Missing\n"); - + { + oss << "Active Material Missing for block: " << block_id << "\n"; + mooseError(oss.str()); + } return mat_iter->second; } std::vector MaterialWarehouse::getBoundaryMaterials(THREAD_ID tid, unsigned int boundary_id) { + std::stringstream oss; + MaterialIterator mat_iter = _active_boundary_materials[tid].find(boundary_id); if (mat_iter == _active_boundary_materials[tid].end()) - mooseError("Active Boundary Material Missing\n"); - + { + oss << "Active Boundary Material Missing for boundary: " << boundary_id << "\n"; + mooseError(oss.str()); + } return mat_iter->second; } diff --git a/framework/src/utils/PenetrationLocator.C b/framework/src/utils/PenetrationLocator.C new file mode 100644 index 000000000000..3f5a56d805f7 --- /dev/null +++ b/framework/src/utils/PenetrationLocator.C @@ -0,0 +1,134 @@ +#include "PenetrationLocator.h" + +#include "boundary_info.h" +#include "elem.h" +#include "plane.h" + +PenetrationLocator::PenetrationLocator(Mesh & mesh, short int master, short int slave) + : _mesh(mesh), + _master_boundary(master), + _slave_boundary(slave) +{} + + +void +PenetrationLocator::detectPenetration() +{ + // Data structures to hold the element boundary information + std::vector< unsigned int > elem_list; + std::vector< unsigned short int > side_list; + std::vector< short int > id_list; + + // Retrieve the Element Boundary data structures from the mesh + _mesh.boundary_info->build_side_list(elem_list, side_list, id_list); + + // Data strcutres to hold the Nodal Boundary conditions + std::vector< unsigned int > node_list; + std::vector< short int > node_boundary_list; + _mesh.boundary_info->build_node_list_from_side_list(); + _mesh.boundary_info->build_node_list(node_list, node_boundary_list); + + // Iterator pairs for use in range functions + std::pair::iterator, std::vector::iterator> bounds_node_boundary; + std::pair::iterator, std::vector::iterator> bounds_nodes, bounds_elems; + std::pair::iterator, std::vector::iterator> bounds_sides; + + // Find the iterators for the master sideset nodes + bounds_node_boundary = std::equal_range(node_boundary_list.begin(), node_boundary_list.end(), _master_boundary); + + // Bound the vector returned from the boundary_info class where the corresponding id vector matches the + // master boundary. We are going to see if any of the nodes on this boundary have penetrated through + // elements on the slave boundary + bounds_nodes = std::make_pair( + node_list.begin() + int(bounds_node_boundary.first - node_boundary_list.begin()), + node_list.begin() + int(bounds_node_boundary.second - node_boundary_list.begin())); + + MeshBase::const_node_iterator node = _mesh.local_nodes_begin(); + MeshBase::const_node_iterator end_node = _mesh.local_nodes_end(); + for ( ; node != end_node ; ++node) + { + // This is a node on the master boundary + if (std::binary_search(bounds_nodes.first, bounds_nodes.second, (*node)->id())) + { + // Now we need to loop over the active elements to see if we have penetrated any + // TODO: This might need some cleanup in parallel + MeshBase::const_element_iterator el = _mesh.active_local_elements_begin(); + MeshBase::const_element_iterator end_el = _mesh.active_local_elements_end(); + for ( ; el != end_el ; ++el) + { + const Elem* elem = *el; + + bounds_node_boundary = std::equal_range(id_list.begin(), id_list.end(), _slave_boundary); + + bounds_elems = std::make_pair( + elem_list.begin() + int(bounds_node_boundary.first - id_list.begin()), + elem_list.begin() + int(bounds_node_boundary.second - id_list.begin())); + + std::vector::iterator pos = std::lower_bound (bounds_elems.first, + bounds_elems.second, + elem->id()); + + // Found the local element on the slave boundary + if (pos != bounds_elems.second && *pos == elem->id()) + { + if (elem->contains_point(**node)) + { + unsigned int side_num = *(side_list.begin() + int(pos - elem_list.begin())); + +#ifdef DEBUG + std::cout << "Node " << (*node)->id() << " contained in " << elem->id() + << " through side " << side_num + << ". Distance: " << normDistance(*(elem->build_side(side_num)), **node) << "\n"; +#endif + + _penetrated_elems[(*node)->id()] = std::make_pair(elem->id(), normDistance(*(elem->build_side(side_num)), **node)); + + } + } + } + } + } +} + +Real +PenetrationLocator::penetrationDistance(unsigned int node_id) const +{ + std::map >::const_iterator found_it; + + if ((found_it = _penetrated_elems.find(node_id)) != _penetrated_elems.end()) + return found_it->second.second; + else + return 0; +} + +Real +PenetrationLocator::normDistance(const Elem & side, const Point & p0) +{ + Real d; + unsigned int dim = _mesh.mesh_dimension(); + + if (dim == 2) + { +// libmesh_assert(side->n_points() == 2); + + Point p1 = side.point(0); + Point p2 = side.point(1); + +// std::cerr << "\nLine Segment: (" << p1(0) << "," << p1(1) << ") - (" << p2(0) << "," << p2(1) << ") " +//รง << "Point: (" << p0(0) << "," << p0(1) << ")\n"; + + + d = std::sqrt(std::pow(((p2(1)-p1(1))*(p0(0)-p1(0))-(p2(0)-p1(0))*(p0(1)-p1(1))),2) / + (std::pow(p2(0)-p1(0),2) + std::pow(p2(1)-p1(1),2))); + } + else if (dim == 3) + { +// libmesh_assert(side.n_points() >= 3); + + Plane p = Plane(side.point(0), side.point(1), side.point(2)); + + d = (p0 - p.closest_point(p0)).size(); + } + + return d; +} diff --git a/test/src/base/MooseTest.C b/test/src/base/MooseTest.C index 35be5056f73a..e73810d5abcb 100644 --- a/test/src/base/MooseTest.C +++ b/test/src/base/MooseTest.C @@ -19,6 +19,7 @@ #include "PolyReaction.h" //including our polynomial Convection Kernel #include "PolyForcing.h" //including our polynomial Reaction Kernel #include "PolyConstantAux.h" //including our polynomial Aux Kernel +#include "PenetrationAux.h" //Local Includes #include "DiffMKernel.h" @@ -59,6 +60,9 @@ namespace MooseTest //Registering our Aux Kernel AuxFactory::instance()->registerAux("MMSConstantAux"); - AuxFactory::instance()->registerAux("PolyConstantAux");} + AuxFactory::instance()->registerAux("PolyConstantAux"); + + AuxFactory::instance()->registerAux("PenetrationAux"); + } } diff --git a/test/tests/penetration_locator_test/2dcontact.e b/test/tests/penetration_locator_test/2dcontact.e new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-C18KgBn&5L z?;Y*^pgqUh^QJu)xlWti=62D4QdR#OEQJ~xvevYk3e;4frUEq;sHs3r1%5LX5T(DF zrPM6szo>v%zT({-o09KTmqM&xK5}>TB&Ay2X3H}_Y}+!cI$cfw|E2aM8?#-(1 z@LIiYQI%e|cMa>(^|~UQD`ivj9owVoO1|{y_Mo(!c=%p*Tr0S0UxDGk)%3OnPvZ^cDsn54$fnIkoTh*2RNz-}y3-G^O z3=I&{CSUaMrzCF@(vDoG#d)mM_y2KyQaAdPzJD~%^0INBk^26m3;O<~efs`U^9}uT z4gEM1%ckZ}de+d7?@iwQxrTnHq5lO#zvtx4`JXfNNz AzW@LL literal 0 HcmV?d00001 diff --git a/test/tests/penetration_locator_test/penetration_locator_test.i b/test/tests/penetration_locator_test/penetration_locator_test.i new file mode 100644 index 000000000000..88c49bd8cbb9 --- /dev/null +++ b/test/tests/penetration_locator_test/penetration_locator_test.i @@ -0,0 +1,97 @@ +[Mesh] + dim = 2 + file = 2dcontact_collide.e +# uniform_refine = 1 +[] + +[Variables] + active = 'u' + + [./u] + order = FIRST + family = LAGRANGE + [../] +[] + +[AuxVariables] + [./penetration] + order = FIRST + family = LAGRANGE + [../] +[] + +[Kernels] + active = 'diff' + + [./diff] + type = Diffusion + variable = u + [../] +[] + +[AuxKernels] + active = 'penetrate' + + [./penetrate] + type = PenetrationAux + variable = penetration + master = 2 + slave = 3 + [../] +[] + +[BCs] + active = 'block1_left block1_right block2_left block2_right' + + [./block1_left] + type = DirichletBC + variable = u + boundary = 1 + value = 0 + [../] + + [./block1_right] + type = DirichletBC + variable = u + boundary = 2 + value = 1 + [../] + + [./block2_left] + type = DirichletBC + variable = u + boundary = 3 + value = 0 + [../] + + [./block2_right] + type = DirichletBC + variable = u + boundary = 4 + value = 1 + [../] +[] + +[Materials] + active = empty + + [./empty] + type = EmptyMaterial + block = '1 2' + [../] +[] + +[Executioner] + type = Steady + perf_log = true + petsc_options = '-snes_mf_operator' +[] + +[Output] + file_base = out + output_initial = true + interval = 1 + exodus = true +[] + + diff --git a/test/tests/penetration_locator_test/penetration_locator_test.py b/test/tests/penetration_locator_test/penetration_locator_test.py new file mode 100644 index 000000000000..d3f660032fe3 --- /dev/null +++ b/test/tests/penetration_locator_test/penetration_locator_test.py @@ -0,0 +1,4 @@ +import tools + +def test(dofs=0, np=0): + tools.executeAppAndDiff(__file__,'penetration_locator_test.i',['out.e'], dofs, np)