https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: d212d60d40d4f67f993df66b5caa5c224925b071 authored by Jörg Buchwald on 30 July 2021, 09:53:10 UTC
fix specific_heat_capacity
Tip revision: d212d60
Reaction.cpp
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 */

#include "Reaction.h"

#include "BaseLib/StringTools.h"
#include "Density100MPa.h"
#include "DensityConst.h"
#include "DensityCook.h"
#include "DensityDubinin.h"
#include "DensityHauer.h"
#include "DensityLegacy.h"
#include "DensityMette.h"
#include "DensityNunez.h"
#include "ReactionCaOH2.h"
#include "ReactionInert.h"
#include "ReactionSinusoidal.h"

namespace Adsorption
{
std::unique_ptr<Reaction> Reaction::newInstance(BaseLib::ConfigTree const& conf)
{
    //! \ogs_file_param{material__adsorption__reaction__type}
    auto const type = conf.getConfigParameter<std::string>("type");

    if (type == "Z13XBF")
    {
        return std::make_unique<DensityLegacy>();
    }
    if (type == "Z13XBF_100MPa")
    {
        return std::make_unique<Density100MPa>();
    }
    if (type == "Z13XBF_Const")
    {
        return std::make_unique<DensityConst>();
    }
    if (type == "Z13XBF_Cook")
    {
        return std::make_unique<DensityCook>();
    }
    if (type == "Z13XBF_Dubinin")
    {
        return std::make_unique<DensityDubinin>();
    }
    if (type == "Z13XBF_Hauer")
    {
        return std::make_unique<DensityHauer>();
    }
    if (type == "Z13XBF_Mette")
    {
        return std::make_unique<DensityMette>();
    }
    if (type == "Z13XBF_Nunez")
    {
        return std::make_unique<DensityNunez>();
    }
    if (type == "Inert")
    {
        return std::make_unique<ReactionInert>();
    }
    if (type == "Sinusoidal")
    {
        return std::make_unique<ReactionSinusoidal>(conf);
    }
    if (type == "CaOH2")
    {
        return std::make_unique<ReactionCaOH2>(conf);
    }

    OGS_FATAL("Unknown reactive system: {:s}.", type);

    return nullptr;
}

}  // namespace Adsorption
back to top