OpenLB 1.7
Loading...
Searching...
No Matches
materialProperties.hh
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2022 Jan E. Marquardt, Mathias J. Krause
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
24#ifndef MATERIAL_PROPERTIES_HH
25#define MATERIAL_PROPERTIES_HH
26
27#include "materialProperties.h"
28
29namespace olb {
30namespace particles {
31namespace contact {
32
33template <typename T, unsigned N>
34void MaterialProperties<T, N>::set(const unsigned material,
35 const T youngsModulus, const T poissonRatio)
36{
37 materialProperties[material][0] = youngsModulus;
38 materialProperties[material][1] = poissonRatio;
39}
40
41template <typename T, unsigned N>
42const T
43MaterialProperties<T, N>::getYoungsModulus(const unsigned material) const
44{
45 return materialProperties[material][0];
46}
47
48template <typename T, unsigned N>
49const T
50MaterialProperties<T, N>::getPoissonsRatio(const unsigned material) const
51{
52 return materialProperties[material][1];
53}
54
55} // namespace contact
56} // namespace particles
57} // namespace olb
58#endif
Top level namespace for all of OpenLB.
void set(const unsigned material, const T youngsModulus, const T poissonRatio)
Set material properties.
const T getPoissonsRatio(const unsigned material) const
Get Poisson's ratio.
const T getYoungsModulus(const unsigned material) const
Get modulus of elasticity.