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.
List of all members
Kratos::PeriodicConditionUtilities Class Reference

Auxiliary utilitiy to define periodic boundary conditions for flow problems. More...

#include <periodic_condition_utilities.h>

Collaboration diagram for Kratos::PeriodicConditionUtilities:

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< doubleDistanceVector
 
typedef std::vector< double >::iterator DistanceIterator
 
typedef Bins< 3, PointType, PointVector, PointTypePointer, PointIterator, DistanceIteratorStaticBins
 
typedef Tree< StaticBinstree
 
 KRATOS_CLASS_POINTER_DEFINITION (PeriodicConditionUtilities)
 Pointer definition of PeriodicConditionUtilities. More...
 

Detailed Description

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:

Member Typedef Documentation

◆ DistanceIterator

◆ DistanceVector

◆ IndexType

◆ PointIterator

typedef std::vector<PointType::Pointer>::iterator Kratos::PeriodicConditionUtilities::PointIterator

◆ PointType

◆ PointTypePointer

◆ PointVector

typedef std::vector<PointType::Pointer> Kratos::PeriodicConditionUtilities::PointVector

◆ SizeType

◆ StaticBins

◆ tree

Constructor & Destructor Documentation

◆ PeriodicConditionUtilities()

Kratos::PeriodicConditionUtilities::PeriodicConditionUtilities ( ModelPart ThisModelPart,
SizeType  ThisDomainSize 
)
inline

Default constructor.

Parameters
ThisModelPartThe problem's ModelPart
ThisDomainSizeThe domain size

◆ ~PeriodicConditionUtilities()

virtual Kratos::PeriodicConditionUtilities::~PeriodicConditionUtilities ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ AddPeriodicVariable()

void Kratos::PeriodicConditionUtilities::AddPeriodicVariable ( Properties rProperties,
Variable< double > &  rVariable 
)
inline

◆ DefinePeriodicBoundary()

void Kratos::PeriodicConditionUtilities::DefinePeriodicBoundary ( Properties::Pointer  pNewProperties,
const std::string &  rConditionLabel,
const double  TranslationX,
const double  TranslationY,
const double  TranslationZ = 0.0 
)
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.

Parameters
rConditionLabelLabel of the periodic condition to be generated.
TranslationXX component of the vector that transforms each node in one side of the periodic boundary to its image in the other.
TranslationYY component of the vector that transforms each node in one side of the periodic boundary to its image in the other.
TranslationZZ component of the vector that transforms each node in one side of the periodic boundary to its image in the other.

◆ GenerateConditions()

template<class TReference >
void Kratos::PeriodicConditionUtilities::GenerateConditions ( const TReference &  MovementRef,
Properties::Pointer  pProperties,
const std::string &  rConditionLabel,
const double  Tolerance = 1e-4 
)
inline

Generate a set of conditions linking each node in the periodic boundary to its image on the other side.

Parameters
MovementRefIf 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.
pPropertiesPointer 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.
rConditionLabelLabel of the periodic condition to be generated.
ToleranceSpatial 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.

◆ Info()

virtual std::string Kratos::PeriodicConditionUtilities::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::PeriodicConditionUtilities::KRATOS_CLASS_POINTER_DEFINITION ( PeriodicConditionUtilities  )

Pointer definition of PeriodicConditionUtilities.

◆ PrintData()

virtual void Kratos::PeriodicConditionUtilities::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintInfo()

virtual void Kratos::PeriodicConditionUtilities::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

◆ SetUpSearchStructure()

void Kratos::PeriodicConditionUtilities::SetUpSearchStructure ( Variable< double > const &  rFlagVar,
const double  FlagValue 
)
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.

Parameters
rFlagVarThe Kratos (double) Variable used to identify the periodic boundary
FlagValueThe value of Variable rFlagVer used to identify the periodic boundary

The documentation for this class was generated from the following file: