KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Auxiliary utilitiy to define periodic boundary conditions for flow problems. More...
#include <periodic_condition_utilities.h>
Public Member Functions | |
Life Cycle | |
PeriodicConditionUtilities (ModelPart &ThisModelPart, SizeType ThisDomainSize) | |
Default constructor. More... | |
virtual | ~PeriodicConditionUtilities () |
Destructor. More... | |
Operations | |
void | SetUpSearchStructure (Variable< double > const &rFlagVar, const double FlagValue) |
Set a spatial search structure that will be used to find the periodic boundary node pairs. More... | |
template<class TReference > | |
void | GenerateConditions (const TReference &MovementRef, Properties::Pointer pProperties, const std::string &rConditionLabel, const double Tolerance=1e-4) |
Generate a set of conditions linking each node in the periodic boundary to its image on the other side. More... | |
void | DefinePeriodicBoundary (Properties::Pointer pNewProperties, const std::string &rConditionLabel, const double TranslationX, const double TranslationY, const double TranslationZ=0.0) |
Find node pairs to define periodic boundary conditions. More... | |
void | AddPeriodicVariable (Properties &rProperties, Variable< double > &rVariable) |
Input and output | |
virtual std::string | Info () const |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream) const |
Print object's data. More... | |
Type Definitions | |
typedef std::size_t | IndexType |
typedef std::size_t | SizeType |
typedef Node | PointType |
typedef Node::Pointer | PointTypePointer |
typedef std::vector< PointType::Pointer > | PointVector |
typedef std::vector< PointType::Pointer >::iterator | PointIterator |
typedef std::vector< double > | DistanceVector |
typedef std::vector< double >::iterator | DistanceIterator |
typedef Bins< 3, PointType, PointVector, PointTypePointer, PointIterator, DistanceIterator > | StaticBins |
typedef Tree< StaticBins > | tree |
KRATOS_CLASS_POINTER_DEFINITION (PeriodicConditionUtilities) | |
Pointer definition of PeriodicConditionUtilities. More... | |
Auxiliary utilitiy to define periodic boundary conditions for flow problems.
This utility will try to find node pairs where one of the nodes is on one side of the periodic boundary and the other is its image on the other side. For each pair, a PeriodicCondition object linking them will be created and appended to the ModelPart's Conditions.
This class is used as follows:
typedef std::vector<double>::iterator Kratos::PeriodicConditionUtilities::DistanceIterator |
typedef std::vector<double> Kratos::PeriodicConditionUtilities::DistanceVector |
typedef std::size_t Kratos::PeriodicConditionUtilities::IndexType |
typedef std::vector<PointType::Pointer>::iterator Kratos::PeriodicConditionUtilities::PointIterator |
typedef Node::Pointer Kratos::PeriodicConditionUtilities::PointTypePointer |
typedef std::vector<PointType::Pointer> Kratos::PeriodicConditionUtilities::PointVector |
typedef std::size_t Kratos::PeriodicConditionUtilities::SizeType |
typedef Bins< 3, PointType, PointVector, PointTypePointer, PointIterator, DistanceIterator > Kratos::PeriodicConditionUtilities::StaticBins |
|
inline |
Default constructor.
ThisModelPart | The problem's ModelPart |
ThisDomainSize | The domain size |
|
inlinevirtual |
Destructor.
|
inline |
|
inline |
Find node pairs to define periodic boundary conditions.
This function uses GenerateConditions to find node pairs where one is the image of the other by the translation defined by the arguments. The resulting conditions will enforce equal values of velocity for each node pair.
rConditionLabel | Label of the periodic condition to be generated. |
TranslationX | X component of the vector that transforms each node in one side of the periodic boundary to its image in the other. |
TranslationY | Y component of the vector that transforms each node in one side of the periodic boundary to its image in the other. |
TranslationZ | Z component of the vector that transforms each node in one side of the periodic boundary to its image in the other. |
|
inline |
Generate a set of conditions linking each node in the periodic boundary to its image on the other side.
MovementRef | If TReference == array_1d<double,3>, MovementRef is assumed to be the transaltion vector between the two sides of the periodic boundary. If TReference == Node, MovementRef is assumed to be the center of symmetry for node pairs. |
pProperties | Pointer to the properties that will be assigned to new conditions. Note that PeriodicConditon objects need to have a value for PERIODIC_VARIABLES in their properties. |
rConditionLabel | Label of the periodic condition to be generated. |
Tolerance | Spatial search tolerance. Two nodes will be considered each other's image if the distance between one and the image of the other is less than this value. |
|
inlinevirtual |
Turn back information as a string.
Kratos::PeriodicConditionUtilities::KRATOS_CLASS_POINTER_DEFINITION | ( | PeriodicConditionUtilities | ) |
Pointer definition of PeriodicConditionUtilities.
|
inlinevirtual |
Print object's data.
|
inlinevirtual |
Print information about this object.
|
inline |
Set a spatial search structure that will be used to find the periodic boundary node pairs.
This function generates a spatial search structure containing all nodes in the periodic boundary, which will be used to find node pairs. Note that both sides of the periodic boundary have to be identified with the same value of rFlagVar.