SPHinXsys  alpha version
eulerian_compressible_fluid_dynamics_complex.h
Go to the documentation of this file.
1 /* -------------------------------------------------------------------------*
2 * SPHinXsys *
3 * --------------------------------------------------------------------------*
4 * SPHinXsys (pronunciation: s'finksis) is an acronym from Smoothed Particle *
5 * Hydrodynamics for industrial compleX systems. It provides C++ APIs for *
6 * physical accurate simulation and aims to model coupled industrial dynamic *
7 * systems including fluid, solid, multi-body dynamics and beyond with SPH *
8 * (smoothed particle hydrodynamics), a meshless computational method using *
9 * particle discretization. *
10 * *
11 * SPHinXsys is partially funded by German Research Foundation *
12 * (Deutsche Forschungsgemeinschaft) DFG HU1527/6-1, HU1527/10-1 *
13 * and HU1527/12-1. *
14 * *
15 * Portions copyright (c) 2017-2020 Technical University of Munich and *
16 * the authors' affiliations. *
17 * *
18 * Licensed under the Apache License, Version 2.0 (the "License"); you may *
19 * not use this file except in compliance with the License. You may obtain a *
20 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
21 * *
22 * --------------------------------------------------------------------------*/
31 #pragma once
32 
34 #include "solid_body.h"
35 #include "solid_particles.h"
36 
37 namespace SPH
38 {
39  namespace eulerian_compressible_fluid_dynamics
40  {
41  typedef DataDelegateContact<EulerianFluidBody, CompressibleFluidParticles, CompressibleFluid,
42  SolidBody, SolidParticles, Solid, DataDelegateEmptyBase>
43  CompressibleFluidWallData;
44  typedef DataDelegateContact<EulerianFluidBody, CompressibleFluidParticles, CompressibleFluid,
45  SPHBody, BaseParticles, BaseMaterial, DataDelegateEmptyBase>
46  CompressibleFluidContactData;
47  typedef DataDelegateContact<EulerianFluidBody, CompressibleFluidParticles, CompressibleFluid,
48  SolidBody, SolidParticles, Solid>
49  CFSIContactData; //CFSI= Compressible Fluid_Structure Interation
54  template <class BaseRelaxationType>
56  {
57  public:
58  template <class BaseBodyRelationType>
59  RelaxationWithWall(BaseBodyRelationType &base_body_relation,
60  BaseBodyRelationContact &wall_contact_relation);
61  virtual ~RelaxationWithWall(){};
62 
63  protected:
64  StdVec<Real> wall_inv_rho_0_;
65  StdVec<StdLargeVec<Real> *> wall_mass_, wall_Vol_;
66  StdVec<StdLargeVec<Vecd> *> wall_vel_ave_, wall_acc_ave_, wall_n_;
67  };
68 
73  template <class BaseViscousAccelerationType>
74  class ViscousWithWall : public RelaxationWithWall<BaseViscousAccelerationType>
75  {
76  public:
77  // template for different combination of constructing body relations
78  template <class BaseBodyRelationType>
79  ViscousWithWall(BaseBodyRelationType &base_body_relation,
80  BaseBodyRelationContact &wall_contact_relation);
81  virtual ~ViscousWithWall(){};
82 
83  protected:
84  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
85  };
86 
88  template <class BaseViscousAccelerationType>
89  class BaseViscousAccelerationWithWall : public BaseViscousAccelerationType
90  {
91  public:
92  explicit BaseViscousAccelerationWithWall(ComplexBodyRelation &fluid_wall_relation);
94  BaseBodyRelationContact &wall_contact_relation);
96  BaseBodyRelationContact &wall_contact_relation);
97  };
99 
104  template <class BasePressureRelaxationType>
105  class PressureRelaxation : public RelaxationWithWall<BasePressureRelaxationType>
106  {
107  public:
108  // template for different combination of constructing body relations
109  template <class BaseBodyRelationType>
110  PressureRelaxation(BaseBodyRelationType &base_body_relation,
111  BaseBodyRelationContact &wall_contact_relation);
112  virtual ~PressureRelaxation(){};
113 
114  protected:
115  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
116  };
117 
119  template <class BasePressureRelaxationType>
120  class BasePressureRelaxationWithWall : public BasePressureRelaxationType
121  {
122  public:
123  explicit BasePressureRelaxationWithWall(ComplexBodyRelation &fluid_wall_relation);
125  BaseBodyRelationContact &wall_contact_relation);
126  BasePressureRelaxationWithWall(ComplexBodyRelation &fluid_complex_relation,
127  BaseBodyRelationContact &wall_contact_relation);
128  };
136  template <class BaseDensityAndEnergyRelaxationType>
137  class DensityAndEnergyRelaxation : public RelaxationWithWall<BaseDensityAndEnergyRelaxationType>
138  {
139  public:
140  // template for different combination of constructing body relations
141  template <class BaseBodyRelationType>
142  DensityAndEnergyRelaxation(BaseBodyRelationType &base_body_relation,
143  BaseBodyRelationContact &wall_contact_relation);
144  virtual ~DensityAndEnergyRelaxation(){};
145 
146  protected:
147  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
148  };
149 
151  template <class BaseDensityAndEnergyRelaxationType>
152  class BaseDensityAndEnergyRelaxationWithWall : public DensityAndEnergyRelaxation<BaseDensityAndEnergyRelaxationType>
153  {
154  public:
155  explicit BaseDensityAndEnergyRelaxationWithWall(ComplexBodyRelation &fluid_wall_relation);
157  BaseBodyRelationContact &wall_contact_relation);
159  BaseBodyRelationContact &wall_contact_relation);
160  };
163  }
164 }
template class pressure relaxation scheme with wall boundary
Definition: eulerian_compressible_fluid_dynamics_complex.h:105
Definition: eulerian_compressible_fluid_dynamics_complex.h:137
The base relation between a SPH body and its contact SPH bodies.
Definition: base_body_relation.h:136
Definition: eulerian_compressible_fluid_dynamics_complex.h:89
Definition: eulerian_compressible_fluid_dynamics_complex.h:120
Abstract base class for general relaxation algorithms with wall.
Definition: eulerian_compressible_fluid_dynamics_complex.h:55
prepare data for contact particle dynamics
Definition: base_particle_dynamics.h:240
The relation combined an inner and a contact body relation. The interaction is in a inner-boundary-co...
Definition: complex_body_relation.h:42
Here, we define the algorithm classes for eulerian fluid dynamics within the body.
template class viscous acceleration with wall boundary
Definition: eulerian_compressible_fluid_dynamics_complex.h:74
Definition: eulerian_compressible_fluid_dynamics_complex.h:152
This is the derived class of base particles.
The abstract relation within a SPH body.
Definition: base_body_relation.h:117
This is the class for bodies used for solid BCs or Elastic structure.
Definition: solid_body_supplementary.cpp:9