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.
binbased_DEM_fluid_coupled_mapping.h
Go to the documentation of this file.
1 //
2 // Project Name: Kratos
3 // Last Modified by: $Author: Guillermo Casas, gcasas@cimne.upc.edu$
4 // Date: $Date: 2014-03-08 08:56:42 $
5 //
6 //
7 
8 #if !defined(KRATOS_BINBASED_DEM_FLUID_COUPLED_MAPPING)
9 #define KRATOS_BINBASED_DEM_FLUID_COUPLED_MAPPING
10 
11 // System includes
12 #include <string>
13 #include <iostream>
14 #include <cstdlib>
15 
16 // Project includes
17 #include "includes/define.h"
18 #include "includes/model_part.h"
20 #include "includes/kratos_flags.h"
21 #include "geometries/geometry.h"
23 #include "utilities/timer.h"
24 #include "utilities/openmp_utils.h"
26 #include "custom_functions.h"
27 #include "fields/velocity_field.h"
29 
30 //Database includes
33 
36 #include "derivative_recovery.h"
37 
38 // /* External includes */
39 #ifdef _OPENMP
40 #include <omp.h>
41 #endif
42 
43 namespace Kratos
44 {
45 
48 
52 
56 
60 
64 
66 
76 // Some function definitions
77 //***************************************************************************************************************
78 //***************************************************************************************************************
79 
80 void ModifyViscosityLikeEinstein(double & viscosity, const double solid_fraction);
81 
82 void ModifyViscosityLikeLiu(double & viscosity, const double solid_fraction);
83 
84 //***************************************************************************************************************
85 //***************************************************************************************************************
86 
87 
88 template <std::size_t TDim, typename TBaseTypeOfSwimmingParticle>
89 class KRATOS_API(SWIMMING_DEM_APPLICATION) BinBasedDEMFluidCoupledMapping
90 {
91 public:
96 typedef std::vector<ResultElementsContainerType> VectorResultElementsContainerType;
97 typedef ModelPart::ElementsContainerType::iterator ElementIteratorType;
99 
102 typedef std::vector<ResultNodesContainerType> VectorResultNodesContainerType;
103 typedef std::vector<Node::Pointer> NodalPointersContainerType;
104 typedef ModelPart::NodesContainerType::iterator NodeIteratorType;
105 
106 typedef std::size_t ListIndexType;
109 
113 
117 
119 //----------------------------------------------------------------
120 // Key for coupling_type
121 //----------------------------------------------------------------
122 // Averaged variables | Fluid Fraction
123 // Fluid-to-DEM | DEM-to-fluid |
124 //----------------------------------------------------------------
125 // 0: Linear Constant Constant
126 // 1: Linear Linear Constant
127 // 2: Linear Linear Linear
128 // 3: Linear Filtered Filtered
129 //----------------------------------------------------------------
130 
131 BinBasedDEMFluidCoupledMapping(Parameters& rParameters, SpatialSearch::Pointer pSpSearch=NULL)
132  : mMustCalculateMaxNodalArea(true),
133  mFluidDeltaTime(0.0),
134  mFluidLastCouplingFromDEMTime(0.0),
135  mMaxNodalAreaInv(0.0),
136  mGentleCouplingInitiationInterval(mFluidDeltaTime),
137  mNumberOfDEMSamplesSoFarInTheCurrentFluidStep(0),
138  mpSpSearch(pSpSearch)
139 {
140  Parameters default_parameters( R"(
141  {
142  "gentle_coupling_initiation": {
143  },
144  "backward_coupling": {},
145  "forward_coupling" : {},
146  "coupling_type": 1,
147  "viscosity_modification_type" : 0,
148  "n_particles_per_depth_distance" : 1,
149  "body_force_per_unit_mass_variable_name" : "BODY_FORCE"
150  } )" );
151 
152  rParameters.ValidateAndAssignDefaults(default_parameters);
153  mMinFluidFraction = rParameters["backward_coupling"]["min_fluid_fraction"].GetDouble();
154  mCouplingType = rParameters["coupling_type"].GetInt();
155  mTimeAveragingType = rParameters["forward_coupling"]["time_averaging_type"].GetInt();
156  mViscosityModificationType = rParameters["viscosity_modification_type"].GetInt();
157  mGentleCouplingInitiationInterval = rParameters["gentle_coupling_initiation"]["initiation_interval"].GetDouble();
158  mParticlesPerDepthDistance = rParameters["n_particles_per_depth_distance"].GetInt();
159  mpBodyForcePerUnitMassVariable = &( KratosComponents< Variable<array_1d<double,3>> >::Get(rParameters["body_force_per_unit_mass_variable_name"].GetString()) );
160  if constexpr (TDim == 3){
161  mParticlesPerDepthDistance = 1;
162  }
163 
164  mGravity = ZeroVector(3);
165  mVariables = VariablesContainer();
166 }
167 
170 
174 
178 
179 template<class TDataType>
181  std::string variable_list_identifier = "DEM";
182  std::string coupling_variable_description = "fluid-interpolated DEM phase variable";
183  AddCouplingVariable<TDataType>(r_variable, variable_list_identifier, coupling_variable_description);
184 }
185 
186 template<class TDataType>
188  std::string variable_list_identifier = "Fluid";
189  std::string coupling_variable_description = "DEM-interpolated fluid phase variable";
190  AddCouplingVariable<TDataType>(r_variable, variable_list_identifier, coupling_variable_description);
191 }
192 
193 template<class TDataType>
195  std::string variable_list_identifier = "DEMToImpose";
196  std::string coupling_variable_description = "DEM-phase variables with imposed fluid-interpolated values";
197  AddCouplingVariable<TDataType>(r_variable, variable_list_identifier, coupling_variable_description);
198 }
199 
200 template<class TDataType>
201 void AddFluidVariableToBeTimeFiltered(Variable<TDataType> const& r_variable, const double time_constant){
202  mAlphas[r_variable] = time_constant;
203  mIsFirstTimeFiltering[r_variable] = true;
204  std::string variable_list_identifier = "FluidTimeFiltered";
205  std::string coupling_variable_description = "Fluid variables to be time-filtered";
206  AddCouplingVariable<TDataType>(r_variable, variable_list_identifier, coupling_variable_description);
207 }
208 
209 template<class TDataType>
210 void AddCouplingVariable(Variable<TDataType> const& r_variable, std::string variable_list_identifier, std::string coupling_variable_description){
211 
212  if (std::is_same<TDataType, double>::value){
213  mVariables.Add(r_variable, variable_list_identifier, "Scalar");
214  }
215 
216  else if (std::is_same<TDataType, array_1d<double, 3> >::value){
217  mVariables.Add(r_variable, variable_list_identifier, "Vector");
218  }
219 
220  else {
221  KRATOS_ERROR << "Variable " << r_variable.Name() << "'s type (" << typeid(r_variable).name()
222  << ") is currently not available as a" << coupling_variable_description << "."
223  << "Please implement." << std::endl;
224  }
225 }
226 
227 void InterpolateFromFluidMesh(ModelPart& r_fluid_model_part, ModelPart& r_dem_model_part, Parameters& parameters, BinBasedFastPointLocator<TDim>& bin_of_objects_fluid, const double alpha);
228 void ImposeFlowOnDEMFromField(FluidFieldUtility& r_flow, ModelPart& r_dem_model_part);
229 void ImposeVelocityOnDEMFromFieldToAuxVelocity(FluidFieldUtility& r_flow, ModelPart& r_dem_model_part);
230 void InterpolateVelocityOnAuxVelocity(ModelPart& r_fluid_model_part, ModelPart& r_dem_model_part, BinBasedFastPointLocator<TDim>& bin_of_objects_fluid, const double alpha);
231 void UpdateOldVelocity(ModelPart& r_dem_model_part);
232 void UpdateOldAdditionalForce(ModelPart& r_dem_model_part);
233 void InterpolateFromDEMMesh(ModelPart& r_dem_model_part, ModelPart& r_fluid_model_part, BinBasedFastPointLocator<TDim>& bin_of_objects_fluid); // this is a bin of objects which contains the FLUID model part
234 void VariingRadiusHomogenizeFromDEMMesh(ModelPart& r_dem_model_part, ModelPart& r_fluid_model_part, const double& search_radius, const double& shape_factor, bool must_search = true, bool use_drew_model = false);
235 void HomogenizeFromDEMMesh(ModelPart& r_dem_model_part, ModelPart& r_fluid_model_part, const double& search_radius, const double& shape_factor, bool must_search = true, bool use_drew_model = false);
236 void ComputePostProcessResults(ModelPart& r_dem_model_part, ModelPart& r_fluid_model_part, ModelPart& rfem_dem_model_part, BinBasedFastPointLocator<TDim>& bin_of_objects_fluid, const ProcessInfo& r_current_process_info);
237 
241 
245 
249 
251 virtual std::string Info() const
252 {
253  return "";
254 }
255 
257 virtual void PrintInfo(std::ostream& rOStream) const {}
258 
260 virtual void PrintData(std::ostream& rOStream) const {}
261 
266 {
267  return (mElementsPartition);
268 }
269 
271 {
272  return (mNodesPartition);
273 }
274 
275 ElementsArrayType::iterator GetElementPartitionBegin(ModelPart& r_model_part, unsigned int k)
276 {
277  ElementsArrayType& pElements = r_model_part.GetCommunicator().LocalMesh().Elements();
278  return (pElements.ptr_begin() + this->GetElementPartition()[k]);
279 }
280 
281 ElementsArrayType::iterator GetElementPartitionEnd(ModelPart& r_model_part, unsigned int k)
282 {
283  ElementsArrayType& pElements = r_model_part.GetCommunicator().LocalMesh().Elements();
284  return (pElements.ptr_begin() + this->GetElementPartition()[k + 1]);
285 }
286 
287 NodesArrayType::iterator GetNodePartitionBegin(ModelPart& r_model_part, unsigned int k)
288 {
289  NodesArrayType& pNodes = r_model_part.GetCommunicator().LocalMesh().Nodes();
290  return (pNodes.ptr_begin() + this->GetNodePartition()[k]);
291 }
292 
293 NodesArrayType::iterator GetNodePartitionEnd(ModelPart& r_model_part, unsigned int k)
294 {
295  NodesArrayType& pNodes = r_model_part.GetCommunicator().LocalMesh().Nodes();
296  return (pNodes.ptr_begin() + this->GetNodePartition()[k + 1]);
297 }
299 
300 protected:
301 
304 
305 private:
306 
307 // This class is a simple database that uses two indices (strings) to encode
308 // different particle lists. The two indices correspond to
309 // i) the set of variables (fluid variables,
310 // DEM variables, fluid variables for time filtering etc.) and
311 // ii) the type (Scalar, Vector, etc.)
312 class VariablesContainer
313 {
314  public:
315  std::map<std::set<std::string>, VariablesList> mCouplingVariablesMap;
316 
317  VariablesList& GetVariablesList(std::string first_criterion, std::string second_criterion=""){
318  std::set<std::string> identifier_set;
319  identifier_set.insert("");
320  identifier_set.insert(first_criterion);
321  identifier_set.insert(second_criterion);
322  if (mCouplingVariablesMap.find(identifier_set) == mCouplingVariablesMap.end()){
323  VariablesList new_list;
324  mCouplingVariablesMap[identifier_set] = new_list;
325  }
326  return mCouplingVariablesMap[identifier_set];
327  }
328 
329  bool Is(VariableData const& rVariable, std::string first_criterion, std::string second_criterion=""){
330  return GetVariablesList(first_criterion, second_criterion).Has(rVariable);
331  }
332 
333  void Add(VariableData const& rVariable, std::string list_identifier, std::string type_id=""){
334  GetVariablesList(list_identifier, type_id).Add(rVariable);
335  GetVariablesList(type_id).Add(rVariable);
336  GetVariablesList(list_identifier).Add(rVariable);
337  GetVariablesList("", "").Add(rVariable);
338  }
339 };
340 
341 bool mMustCalculateMaxNodalArea;
342 double mFluidDeltaTime;
343 double mFluidLastCouplingFromDEMTime;
344 double mMinFluidFraction;
345 double mMaxNodalAreaInv;
346 double mGentleCouplingInitiationInterval;
347 int mCouplingType;
348 int mTimeAveragingType;
349 int mViscosityModificationType;
350 int mParticlesPerDepthDistance;
351 int mNumberOfDEMSamplesSoFarInTheCurrentFluidStep;
352 array_1d<double, 3> mGravity;
353 
354 VariablesContainer mVariables;
355 std::map<VariableData, double> mAlphas;
356 std::map<VariableData, bool> mIsFirstTimeFiltering;
357 PointPointSearch::Pointer mpPointPointSearch;
358 SpatialSearch::Pointer mpSpSearch;
359 
360 FluidFieldUtility mFlowField;
361 
362 const Variable<array_1d<double,3>>* mpBodyForcePerUnitMassVariable;
363 
364 // neighbour lists (for mCouplingType = 3)
365 std::vector<double> mSearchRadii; // list of nodal search radii (filter radii). It is a vector since spatial search is designed for varying radius
366 std::vector<SwimmingParticle<TBaseTypeOfSwimmingParticle>* > mSwimmingSphereElementPointers;
367 VectorResultNodesContainerType mVectorsOfNeighNodes; // list of arrays of pointers to the particle's nodal neighbours
368 VectorDistanceType mVectorsOfDistances; // list of arrays of distances to the particle's neighbours
369 VectorDistanceType mVectorsOfRadii;
370 
371 //***************************************************************************************************************
372 //***************************************************************************************************************
373 void ApplyExponentialTimeFiltering(ModelPart& r_model_part, const VariableData& r_current_variable);
374 void ApplyExponentialTimeFiltering(ModelPart& r_model_part, const Variable<double>& r_current_variable, const Variable<double>& r_previous_averaged_variable = TIME_AVERAGED_DOUBLE);
375 void ApplyExponentialTimeFiltering(ModelPart& r_model_part, const Variable<array_1d<double, 3> >& r_current_variable, const Variable<array_1d<double, 3> >& r_previous_averaged_variable = TIME_AVERAGED_ARRAY_3);
376 void CopyValues(ModelPart& r_model_part, VariableData const& r_origin_variable);
377 void CopyValues(ModelPart& r_model_part, const Variable<double>& r_origin_variable, const Variable<double>& r_destination_variable = TIME_AVERAGED_DOUBLE);
378 void CopyValues(ModelPart& r_model_part, const Variable<array_1d<double, 3> >& r_origin_variable, const Variable<array_1d<double, 3> >& r_destination_variable = TIME_AVERAGED_ARRAY_3);
379 void ComputeHomogenizedFluidFraction(ModelPart& r_fluid_model_part, ModelPart& r_dem_model_part);
380 void InterpolateFluidFraction(ModelPart& r_dem_model_part, ModelPart& r_fluid_model_part, BinBasedFastPointLocator<TDim>& bin_of_objects_fluid); // this is a bin of objects which contains the FLUID model part
381 void InterpolateOtherFluidVariables(ModelPart& r_dem_model_part, ModelPart& r_fluid_model_part, BinBasedFastPointLocator<TDim>& bin_of_objects_fluid); // this is a bin of objects which contains the FLUID model part
382 void SearchParticleNodalNeighbours(ModelPart& r_fluid_model_part, ModelPart& r_dem_model_part, const double& search_radius);
383 void SearchParticleNodalNeighboursFixedRadius(ModelPart& r_fluid_model_part, ModelPart& r_dem_model_part, const double& search_radius);
384 void RecalculateDistances(ModelPart& r_dem_model_part);
385 void UpdateGentleCouplingInitiationCoefficients(ModelPart& r_dem_model_part);
386 array_1d<double, 3> CalculateAcceleration(const Geometry<Node >& geom, const Vector& N);
387 double CalculateNormOfSymmetricGradient(const Geometry<Node >& geom, const int index);
388 array_1d<double, 3> CalculateVorticity(const Geometry<Node >& geom, const int index);
389 void Project(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node, const VariableData *r_destination_variable, double alpha);
390 void DistributeDimensionalContributionToFluidFraction(Element::Pointer p_elem, const Vector& N, ParticleType& particle);
391 void Distribute(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node,const VariableData *r_destination_variable);
392 void ComputeHomogenizedNodalVariable(const ParticleType& particle, const ResultNodesContainerType& neighbours, const DistanceType& weights, const VariableData *r_destination_variable, bool use_drew_model);
393 void CalculateFluidFraction(ModelPart& r_fluid_model_part);
394 void CalculateFluidMassFraction(ModelPart& r_fluid_model_part);
395 void Interpolate(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node, const Variable<array_1d<double, 3> >& r_origin_variable, const Variable<array_1d<double, 3> >& r_destination_variable, double alpha);
396 void Interpolate(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node, const Variable<double>& r_origin_variable, const Variable<double>& r_destination_variable, double alpha);
397 void CalculateVelocityProjectedRate(Node::Pointer p_node);
398 void InterpolateAcceleration(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node, const Variable<array_1d<double, 3> >& r_destination_variable);
399 void InterpolateShearRate(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node, const Variable<double>& r_destination_variable);
400 void InterpolateShearRate(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node, const Variable<double>& r_destination_variable, double alpha);
401 void InterpolateVorticity(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node, const Variable<array_1d<double, 3> >& r_destination_variable);
402 void InterpolateVorticity(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node, const Variable<array_1d<double, 3> >& r_destination_variable, double alpha);
403 void TransferWithConstantWeighing(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node, const Variable<array_1d<double, 3> >& r_destination_variable, const Variable<array_1d<double, 3> >& r_origin_variable);
404 void TransferWithLinearWeighing(Element::Pointer p_elem, const array_1d<double,TDim + 1>& N, Node::Pointer p_node, const Variable<array_1d<double, 3> >& r_destination_variable, const Variable<array_1d<double, 3> >& r_origin_variable);
405 void CalculateNodalFluidFractionWithConstantWeighing(Element::Pointer p_elem, const Vector& N, ParticleType& particle);
406 void CalculateNodalFluidFractionWithLinearWeighing(Element::Pointer p_elem, const Vector& N, ParticleType& particle);
407 void CalculateNodalFluidFractionByLumpedL2Projection(Element::Pointer p_elem, const Vector& N, Node::Pointer p_node);
408 //void CalculateFluidFractionGradient(ModelPart& r_model_part);
409 void TransferByAveraging(const ParticleType& particle, const ResultNodesContainerType& neighbours, const DistanceType& weights, const Variable<array_1d<double, 3> >& r_destination_variable, const Variable<array_1d<double, 3> >& r_origin_variable, bool use_drew_model);
410 void CalculateNodalFluidFractionByAveraging(ParticleType& particle, const ResultNodesContainerType& neighbours, const DistanceType& weights);
411 void CalculateNodalSolidFractionByAveraging(const Node::Pointer p_node, const ResultNodesContainerType& neighbours, const DistanceType& weights, const double averaging_volume_inv);
412 void MultiplyNodalVariableBy(ModelPart& r_model_part, const Variable<double>& r_variable, const double& factor);
413 void MultiplyNodalVariableBy(ModelPart& r_model_part, const Variable<array_1d<double, 3> >& r_variable, const double& factor);
414 void ResetDEMVariables(ModelPart& r_dem_model_part);
415 void ResetFluidVariables(ModelPart& r_fluid_model_part);
416 void ResetFLuidVelocityRate(const NodeIteratorType& node_it);
417 void SetToZero(ModelPart& r_model_part, const VariableData& r_variable);
418 void CalculateFluidNodesMaxNodalArea(ModelPart& r_fluid_model_part);
419 inline void ClearVariable(const NodeIteratorType& node_it, const VariableData& var);
420 inline unsigned int GetNearestNode(const Vector& N);
421 void FillVectorOfSwimmingSpheres(ModelPart& r_dem_model_part);
422 double inline CalculateDistance(Node::Pointer a, SwimmingParticle<TBaseTypeOfSwimmingParticle>* b);
423 double inline GetAlpha(const VariableData& r_variable);
424 const Variable<array_1d<double,3>>& GetBodyForcePerUnitMassVariable() const;
425 bool CheckVariablesTypesCoincide(const VariableData& var_1, const VariableData& var_2) const;
426 //***************************************************************************************************************
427 //***************************************************************************************************************
428 
429 
433 
437 
441 
445 
449 
452 
454 
455 }; // Class BinBasedDEMFluidCoupledMapping
456 
458 template<std::size_t TDim, typename TBaseTypeOfSwimmingParticle>
459 inline std::ostream& operator << (std::ostream& rOStream,
461 {
462  rThis.PrintInfo(rOStream);
463  rOStream << std::endl;
464  rThis.PrintData(rOStream);
465 
466  return rOStream;
467 }
469 
470 } // namespace Kratos.
471 
472 #endif // KRATOS_BINBASED_DEM_FLUID_COUPLED_MAPPING defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: binbased_DEM_fluid_coupled_mapping.h:90
std::size_t ListIndexType
Definition: binbased_DEM_fluid_coupled_mapping.h:106
NodesArrayType::iterator GetNodePartitionBegin(ModelPart &r_model_part, unsigned int k)
Definition: binbased_DEM_fluid_coupled_mapping.h:287
void AddDEMCouplingVariable(Variable< TDataType > const &r_variable)
Definition: binbased_DEM_fluid_coupled_mapping.h:180
void AddCouplingVariable(Variable< TDataType > const &r_variable, std::string variable_list_identifier, std::string coupling_variable_description)
Definition: binbased_DEM_fluid_coupled_mapping.h:210
DenseVector< unsigned int > mNodesPartition
Definition: binbased_DEM_fluid_coupled_mapping.h:303
DenseVector< unsigned int > mElementsPartition
Definition: binbased_DEM_fluid_coupled_mapping.h:302
ModelPart::NodesContainerType::iterator NodeIteratorType
Definition: binbased_DEM_fluid_coupled_mapping.h:104
std::vector< ResultNodesContainerType > VectorResultNodesContainerType
Definition: binbased_DEM_fluid_coupled_mapping.h:102
ModelPart::NodesContainerType NodesArrayType
Definition: binbased_DEM_fluid_coupled_mapping.h:100
void AddFluidVariableToBeTimeFiltered(Variable< TDataType > const &r_variable, const double time_constant)
Definition: binbased_DEM_fluid_coupled_mapping.h:201
DenseVector< unsigned int > & GetNodePartition()
Definition: binbased_DEM_fluid_coupled_mapping.h:270
DenseVector< unsigned int > & GetElementPartition()
Definition: binbased_DEM_fluid_coupled_mapping.h:265
KRATOS_CLASS_POINTER_DEFINITION(BinBasedDEMFluidCoupledMapping_TDim_TBaseTypeOfSwimmingParticle)
virtual ~BinBasedDEMFluidCoupledMapping()
Destructor.
Definition: binbased_DEM_fluid_coupled_mapping.h:169
NodesArrayType::iterator GetNodePartitionEnd(ModelPart &r_model_part, unsigned int k)
Definition: binbased_DEM_fluid_coupled_mapping.h:293
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: binbased_DEM_fluid_coupled_mapping.h:260
void AddFluidCouplingVariable(Variable< TDataType > const &r_variable)
Definition: binbased_DEM_fluid_coupled_mapping.h:187
virtual std::string Info() const
Turn back information as a stemplate<class T, std::size_t dim> tring.
Definition: binbased_DEM_fluid_coupled_mapping.h:251
ModelPart::ElementsContainerType ElementsArrayType
Definition: binbased_DEM_fluid_coupled_mapping.h:94
void AddDEMVariablesToImpose(Variable< TDataType > const &r_variable)
Definition: binbased_DEM_fluid_coupled_mapping.h:194
ElementsArrayType::ContainerType ResultElementsContainerType
Definition: binbased_DEM_fluid_coupled_mapping.h:95
SpatialSearch::DistanceType DistanceType
Definition: binbased_DEM_fluid_coupled_mapping.h:107
NodesArrayType::ContainerType ResultNodesContainerType
Definition: binbased_DEM_fluid_coupled_mapping.h:101
ElementsArrayType::iterator GetElementPartitionBegin(ModelPart &r_model_part, unsigned int k)
Definition: binbased_DEM_fluid_coupled_mapping.h:275
SpatialSearch::VectorDistanceType VectorDistanceType
Definition: binbased_DEM_fluid_coupled_mapping.h:108
ElementsArrayType::iterator GetElementPartitionEnd(ModelPart &r_model_part, unsigned int k)
Definition: binbased_DEM_fluid_coupled_mapping.h:281
BinBasedDEMFluidCoupledMapping(Parameters &rParameters, SpatialSearch::Pointer pSpSearch=NULL)
Default constructor.
Definition: binbased_DEM_fluid_coupled_mapping.h:131
BinBasedDEMFluidCoupledMapping< TDim, TBaseTypeOfSwimmingParticle > BinBasedDEMFluidCoupledMapping_TDim_TBaseTypeOfSwimmingParticle
Pointer definition of BinBasedDEMFluidCoupledMapping.
Definition: binbased_DEM_fluid_coupled_mapping.h:111
ModelPart::ElementsContainerType::iterator ElementIteratorType
Definition: binbased_DEM_fluid_coupled_mapping.h:97
std::vector< Node::Pointer > NodalPointersContainerType
Definition: binbased_DEM_fluid_coupled_mapping.h:103
SwimmingParticle< TBaseTypeOfSwimmingParticle > ParticleType
Definition: binbased_DEM_fluid_coupled_mapping.h:98
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: binbased_DEM_fluid_coupled_mapping.h:257
std::vector< ResultElementsContainerType > VectorResultElementsContainerType
Definition: binbased_DEM_fluid_coupled_mapping.h:96
This class is designed to allow the fast location of MANY points on the top of a 3D mesh.
Definition: binbased_fast_point_locator.h:68
MeshType & LocalMesh()
Returns the reference to the mesh storing all local entities.
Definition: communicator.cpp:245
Definition: fluid_field_utility.h:13
Geometry base class.
Definition: geometry.h:71
Definition: amatrix_interface.h:41
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
NodesContainerType & Nodes()
Definition: mesh.h:346
ElementsContainerType & Elements()
Definition: mesh.h:568
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
Communicator & GetCommunicator()
Definition: model_part.h:1821
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
double GetDouble() const
This method returns the double contained in the current Parameter.
Definition: kratos_parameters.cpp:657
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
std::vector< DistanceType > VectorDistanceType
Definition: spatial_search.h:97
std::vector< double > DistanceType
Definition: spatial_search.h:96
Definition: swimming_particle.h:28
This class is the base of variables and variable's components which contains their common data.
Definition: variable_data.h:49
const std::string & Name() const
Definition: variable_data.h:201
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
Holds a list of variables and their position in VariablesListDataValueContainer.
Definition: variables_list.h:50
bool Has(const VariableData &rThisVariable) const
Definition: variables_list.h:372
#define KRATOS_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
ModelPart::NodesContainerType::iterator NodeIteratorType
Definition: fix_free_velocity_on_nodes_process.h:25
void ModifyViscosityLikeEinstein(double &viscosity, const double solid_fraction)
This class allows the interpolation between non-matching simplicial meshes in 2D and 3D with linear s...
Definition: binbased_DEM_fluid_coupled_mapping.cpp:9
void ModifyViscosityLikeLiu(double &viscosity, const double solid_fraction)
Definition: binbased_DEM_fluid_coupled_mapping.cpp:15
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
float viscosity
Definition: edgebased_var.py:8
parameters
Definition: fluid_chimera_analysis.py:35
alpha
Definition: generate_convection_diffusion_explicit_element.py:113
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
def Interpolate(variable, entity, sf_values, historical_value)
Definition: point_output_process.py:231
int k
Definition: quadrature.py:595
N
Definition: sensitivityMatrix.py:29
float factor
for node in (self.combined_model_part).Nodes: pold = node.GetSolutionStepValue(PRESSURE,...
Definition: ulf_PGLASS.py:254
Configure::ContainerType ContainerType
Definition: transfer_utility.h:247