SPHinXsys  alpha version
compressible_fluid.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 #pragma once
31 
32 #include "base_material.h"
33 
34 namespace SPH
35 {
40  class CompressibleFluid : public Fluid
41  {
42  protected:
43  Real gamma_;
45  public:
46  explicit CompressibleFluid(Real rho0, Real gamma, Real mu = 0.0)
47  : Fluid(rho0, mu), gamma_(gamma)
48  {
49  material_type_name_ = "CompressibleFluid";
50  };
51  virtual ~CompressibleFluid(){};
52 
53  Real HeatCapacityRatio() { return gamma_; };
54  virtual Real getPressure(Real rho, Real rho_e) override;
55  virtual Real getPressure(Real rho) override { return 0.0; };
56  virtual Real DensityFromPressure(Real p) override { return 0.0; };
57  virtual Real getSoundSpeed(Real p, Real rho) override;
58  virtual CompressibleFluid *ThisObjectPtr() override { return this; };
59  };
60 }
Base class of all fluids.
Definition: base_material.h:89
CompressibleFluid(Real rho0, Real gamma, Real mu=0.0)
Definition: compressible_fluid.h:46
This is the base classes of all materials. A function in a derived material class returns a value wit...
Ideal gas equation of state (EOS).
Definition: compressible_fluid.h:40
Definition: solid_body_supplementary.cpp:9