Page MenuHomec4science

elasto_plastic_model.hh
No OneTemporary

File Metadata

Created
Sat, Apr 27, 20:53

elasto_plastic_model.hh

/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-2020 EPFL (École Polytechnique Fédérale de Lausanne),
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef ELASTO_PLASTIC_MODEL_HH
#define ELASTO_PLASTIC_MODEL_HH
/* -------------------------------------------------------------------------- */
#include "grid_base.hh"
#include "model_template.hh"
#include "model_type.hh"
#include "tamaas.hh"
#include <memory>
#include <vector>
/* -------------------------------------------------------------------------- */
namespace tamaas {
/* -------------------------------------------------------------------------- */
/**
* @brief Elasto-plastic model: contains information on plastic state
*/
template <model_type type>
class ElastoPlasticModel : public ModelTemplate<type> {
static_assert(type == model_type::volume_1d || type == model_type::volume_2d,
"Only volume types are supported");
public:
/// Constructor
ElastoPlasticModel(const std::vector<Real>& system_size,
const std::vector<UInt>& discretization);
void setHardening(Real h) { hardening = h; }
void setInitialYield(Real sigma) { yield_0 = sigma; }
void initializeBEEngine() override;
protected:
Real hardening, yield_0;
std::unique_ptr<GridBase<Real>> plastic_accumulation = nullptr;
std::unique_ptr<GridBase<Real>> plastic_deformation = nullptr;
std::unique_ptr<GridBase<Real>> stress = nullptr;
};
/* -------------------------------------------------------------------------- */
} // namespace tamaas
#endif // ELASTO_PLASTIC_MODEL_HH

Event Timeline