Page MenuHomec4science

elasto_plastic_model.hh
No OneTemporary

File Metadata

Created
Thu, Jun 6, 03:48

elasto_plastic_model.hh

/**
* @file
*
* @author Lucas Frérot <lucas.frerot@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2017 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Tamaas is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Tamaas 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 Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Tamaas. If not, see <http://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