MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Newtonian.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2021-2025 MPM-Geomechanics Development Team
3
4#ifndef NEWTONIAN_H_
5#define NEWTONIAN_H_
6
8#include "Particle/Particle.h"
9
12class Newtonian: public Material {
13
14public:
15
21 Newtonian(int id, double density, double viscosity, double bulk);
22
24 virtual ~Newtonian();
25
28 inline void setViscosity(double viscosity) { this->Viscosity = viscosity; }
29
32 inline void setBulk(double bulk) { this->Bulk = bulk; }
33
36 virtual void updateStress(Particle* particle) const override;
37
40 inline virtual Material::MaterialType getType() const { return Material::getType(); }
41
44 virtual double getSoundSpeed() const override;
45
46protected:
47 double Viscosity;
48 double Bulk;
49};
50
51inline Newtonian::Newtonian(int id, double density, double viscosity, double bulk)
52: Material(id, density, Material::MaterialType::NEWTONIAN)
53{
54 this->Viscosity = viscosity;
55 this->Bulk = bulk;
56}
57
59
60#endif /* NEWTONIAN_H_ */
Represents a material.
Definition Material.h:14
virtual MaterialType getType() const
Returns the material type.
Definition Material.h:84
double density
initial material density or initial solid density in two-phase calculations
Definition Material.h:98
MaterialType
Definition Material.h:20
Represents a Newtonian fluid.
Definition Newtonian.h:12
virtual ~Newtonian()
Default destructor.
Definition Newtonian.h:58
Newtonian(int id, double density, double viscosity, double bulk)
Create a Newtonian fluid material.
Definition Newtonian.h:51
void setViscosity(double viscosity)
Configure the dynamic viscosity.
Definition Newtonian.h:28
virtual double getSoundSpeed() const override
Get sound speed.
void setBulk(double bulk)
Configure the bulk modulus.
Definition Newtonian.h:32
virtual void updateStress(Particle *particle) const override
Update the stress in the particle.
virtual Material::MaterialType getType() const
Return the material type.
Definition Newtonian.h:40
double Bulk
Bulk modulus .
Definition Newtonian.h:48
double Viscosity
Dynamic viscosity .
Definition Newtonian.h:47
Represents a Lagrangian material point This class contain all Lagrangian variables that represents th...
Definition Particle.h:25