SPHinXsys  alpha version
external_force.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 * --------------------------------------------------------------------------*/
30 #ifndef EXTERNAL_FORCE_H
31 #define EXTERNAL_FORCE_H
32 
33 
34 
35 #include "base_data_package.h"
36 
37 namespace SPH {
43  {
44  public:
45  ExternalForce();
46  virtual ~ExternalForce() {};
48  virtual Vecd InducedAcceleration(Vecd& position) = 0;
49  };
50 
55  class Gravity : public ExternalForce
56  {
57  protected:
58  Vecd global_acceleration_;
59  Vecd zero_potential_reference_;
60  public:
61  Gravity(Vecd gravity_vector, Vecd reference_position = Vecd(0));
62  virtual ~Gravity() {};
63 
65  virtual Vecd InducedAcceleration(Vecd& position) override;
66  Real getPotential(Vecd& position);
67  };
68 }
69 #endif //EXTERNAL_FORCE_H
virtual Vecd InducedAcceleration(Vecd &position)=0
This class define external forces.
Definition: external_force.h:42
virtual Vecd InducedAcceleration(Vecd &position) override
Definition: external_force.cpp:15
The gravity force, derived class of External force.
Definition: external_force.h:55
Definition: solid_body_supplementary.cpp:9