diff --git a/Documentation/ProjectFile/prj/process_variables/process_variable/source_terms/source_term/Volumetric/c_Volumetric.md b/Documentation/ProjectFile/prj/process_variables/process_variable/source_terms/source_term/Volumetric/c_Volumetric.md new file mode 100644 index 0000000000000000000000000000000000000000..731c3267827f90ec1dc97888000bf3cca46f6bac --- /dev/null +++ b/Documentation/ProjectFile/prj/process_variables/process_variable/source_terms/source_term/Volumetric/c_Volumetric.md @@ -0,0 +1,3 @@ +Declares a source term that is defined on the entire domain. + +The user should carefully check which physical quantity that parameter is. diff --git a/Documentation/ProjectFile/prj/process_variables/process_variable/source_terms/source_term/Volumetric/t_parameter.md b/Documentation/ProjectFile/prj/process_variables/process_variable/source_terms/source_term/Volumetric/t_parameter.md new file mode 100644 index 0000000000000000000000000000000000000000..c8d721a55533cdfa72ed977a48b43a24e1a18a8d --- /dev/null +++ b/Documentation/ProjectFile/prj/process_variables/process_variable/source_terms/source_term/Volumetric/t_parameter.md @@ -0,0 +1,4 @@ +The name of the parameter that defines the value that should be used for the source +term. Nodal parameters are not supported. + +The user should carefully check which physical quantity that parameter is. diff --git a/ProcessLib/GroundwaterFlow/Tests.cmake b/ProcessLib/GroundwaterFlow/Tests.cmake index 77a293d5b08e4b6bee026178ce00641f903d07bc..c0a1c15c3b140fab501cbbf0fb0913c8aa06b15f 100644 --- a/ProcessLib/GroundwaterFlow/Tests.cmake +++ b/ProcessLib/GroundwaterFlow/Tests.cmake @@ -682,6 +682,30 @@ AddTest( VIS square_1e6__nodal_sources_expected_pcs_0_ts_1_t_1.000000.vtu ) +AddTest( + NAME GroundWaterFlowProcess_VolumetricSourceTerm_square_1e2 + PATH Elliptic/square_1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS square_1e2_volumetricsourceterm.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + DIFF_DATA + square_1x1_quad_1e2_volumetricsourceterm_analytical_solution.vtu square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure 1e-14 1e-16 +) + +AddTest( + NAME GroundWaterFlowProcess_VolumetricSourceTerm_square_1e3 + PATH Elliptic/square_1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS square_1e3_volumetricsourceterm.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + DIFF_DATA + square_1x1_quad_1e3_volumetricsourceterm_analytical_solution.vtu square_1e3_volumetricsourceterm_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure 1e-10 1e-11 +) + AddTest( NAME PythonBCGroundWaterFlowProcessLaplaceEqDirichletNeumann PATH Elliptic/square_1x1_GroundWaterFlow_Python diff --git a/ProcessLib/Process.cpp b/ProcessLib/Process.cpp index 8e4ad70fe293efab5e160756b20911ab4b861ecd..152f2a3fba15e1f7014e318eca822955f75f29eb 100644 --- a/ProcessLib/Process.cpp +++ b/ProcessLib/Process.cpp @@ -189,7 +189,7 @@ void Process::assemble(const double t, GlobalVector const& x, GlobalMatrix& M, (_coupled_solutions) != nullptr ? _coupled_solutions->process_id : 0; _boundary_conditions[pcs_id].applyNaturalBC(t, x, K, b, nullptr); - _source_term_collections[pcs_id].integrateNodalSourceTerms(t, b); + _source_term_collections[pcs_id].integrate(t, b); } void Process::assembleWithJacobian(const double t, GlobalVector const& x, diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h index b887d36dc2360751d5c0a0e9b9bc297f1be1e2d8..7de13ac539e0e963233b792c17a05de37ee0b7b5 100644 --- a/ProcessLib/Process.h +++ b/ProcessLib/Process.h @@ -21,7 +21,6 @@ #include "ProcessLib/Output/IntegrationPointWriter.h" #include "ProcessLib/Output/SecondaryVariable.h" #include "ProcessLib/Parameter/Parameter.h" -#include "ProcessLib/SourceTerms/NodalSourceTerm.h" #include "ProcessLib/SourceTerms/SourceTermCollection.h" #include "AbstractJacobianAssembler.h" diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp index 71c7508872933e17a9f65ff69d922e6c6fcd12de..475bf1e570fee7a26e26c2689a4228ddbaef0c0f 100644 --- a/ProcessLib/ProcessVariable.cpp +++ b/ProcessLib/ProcessVariable.cpp @@ -18,7 +18,7 @@ #include "ProcessLib/BoundaryCondition/BoundaryCondition.h" #include "ProcessLib/BoundaryCondition/CreateBoundaryCondition.h" #include "ProcessLib/SourceTerms/CreateSourceTerm.h" -#include "ProcessLib/SourceTerms/NodalSourceTerm.h" +#include "ProcessLib/SourceTerms/SourceTerm.h" #include "ProcessLib/Utils/ProcessUtils.h" namespace @@ -211,14 +211,14 @@ ProcessVariable::createBoundaryConditions( return bcs; } -std::vector<std::unique_ptr<NodalSourceTerm>> +std::vector<std::unique_ptr<SourceTerm>> ProcessVariable::createSourceTerms( const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id, unsigned const integration_order, std::vector<std::unique_ptr<ParameterBase>> const& parameters) { - std::vector<std::unique_ptr<NodalSourceTerm>> source_terms; + std::vector<std::unique_ptr<SourceTerm>> source_terms; for (auto& config : _source_term_configs) source_terms.emplace_back(createSourceTerm( diff --git a/ProcessLib/ProcessVariable.h b/ProcessLib/ProcessVariable.h index 24101fb58d235baa106d477b0c7a1033baa35350..383e9761c8fab8a3e1ff86d8be6fbc330c8e0be3 100644 --- a/ProcessLib/ProcessVariable.h +++ b/ProcessLib/ProcessVariable.h @@ -25,7 +25,7 @@ class LocalToGlobalIndexMap; namespace ProcessLib { -class NodalSourceTerm; +class SourceTerm; class BoundaryCondition; class Process; } // namespace ProcessLib @@ -59,7 +59,7 @@ public: std::vector<std::unique_ptr<ParameterBase>> const& parameters, Process const& process); - std::vector<std::unique_ptr<NodalSourceTerm>> createSourceTerms( + std::vector<std::unique_ptr<SourceTerm>> createSourceTerms( const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id, unsigned const integration_order, std::vector<std::unique_ptr<ParameterBase>> const& parameters); diff --git a/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp b/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp index 74d792253db3068dc20b20dfeb67719af4d07fee..04c2227954dc8594f1ce424b00c8dc5c4d088530 100644 --- a/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp +++ b/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp @@ -18,7 +18,7 @@ namespace ProcessLib { -std::unique_ptr<NodalSourceTerm> createNodalSourceTerm( +std::unique_ptr<SourceTerm> createNodalSourceTerm( BaseLib::ConfigTree const& config, MeshLib::Mesh const& st_mesh, const NumLib::LocalToGlobalIndexMap& dof_table, std::size_t const bulk_mesh_id, const int variable_id, diff --git a/ProcessLib/SourceTerms/CreateNodalSourceTerm.h b/ProcessLib/SourceTerms/CreateNodalSourceTerm.h index 9144d92f10906d3a3f203202e20a0910edcd6972..9f0c97169452ce473e89ff5c00f7e183afc10b63 100644 --- a/ProcessLib/SourceTerms/CreateNodalSourceTerm.h +++ b/ProcessLib/SourceTerms/CreateNodalSourceTerm.h @@ -26,13 +26,13 @@ class LocalToGlobalIndexMap; } namespace ProcessLib { -class NodalSourceTerm; +class SourceTerm; struct ParameterBase; } // namespace ProcessLib namespace ProcessLib { -std::unique_ptr<NodalSourceTerm> createNodalSourceTerm( +std::unique_ptr<SourceTerm> createNodalSourceTerm( BaseLib::ConfigTree const& config, MeshLib::Mesh const& st_mesh, const NumLib::LocalToGlobalIndexMap& dof_table, std::size_t mesh_id, const int variable_id, const int component_id, diff --git a/ProcessLib/SourceTerms/CreateSourceTerm.cpp b/ProcessLib/SourceTerms/CreateSourceTerm.cpp index 32a4a778c52e5c819cee545bb0276905f5b4dd08..4e50e55f62343ea6eed0a69cb418af8ae9893279 100644 --- a/ProcessLib/SourceTerms/CreateSourceTerm.cpp +++ b/ProcessLib/SourceTerms/CreateSourceTerm.cpp @@ -10,16 +10,17 @@ #include "CreateSourceTerm.h" #include "CreateNodalSourceTerm.h" -#include "NodalSourceTerm.h" +#include "CreateVolumetricSourceTerm.h" +#include "SourceTerm.h" #include "SourceTermConfig.h" namespace ProcessLib { -std::unique_ptr<NodalSourceTerm> createSourceTerm( +std::unique_ptr<SourceTerm> createSourceTerm( const SourceTermConfig& config, const NumLib::LocalToGlobalIndexMap& dof_table, const MeshLib::Mesh& mesh, - const int variable_id, const unsigned /*integration_order*/, - const unsigned /*shapefunction_order*/, + const int variable_id, const unsigned integration_order, + const unsigned shapefunction_order, std::vector<std::unique_ptr<ProcessLib::ParameterBase>> const& parameters) { //! \ogs_file_param{prj__process_variables__process_variable__source_terms__source_term__type} @@ -32,6 +33,14 @@ std::unique_ptr<NodalSourceTerm> createSourceTerm( *config.component_id, parameters); } + if (type == "Volumetric") + { + return ProcessLib::createVolumetricSourceTerm( + config.config, config.mesh, dof_table, parameters, + integration_order, shapefunction_order, variable_id, + *config.component_id); + } + OGS_FATAL("Unknown source term type: `%s'.", type.c_str()); } } // namespace ProcessLib diff --git a/ProcessLib/SourceTerms/CreateSourceTerm.h b/ProcessLib/SourceTerms/CreateSourceTerm.h index 41c058997448b0cbe4f50fd3fb3c18ffb77e2303..ddec4e111b6e523cdf1dae5488b6b551212fc09c 100644 --- a/ProcessLib/SourceTerms/CreateSourceTerm.h +++ b/ProcessLib/SourceTerms/CreateSourceTerm.h @@ -26,13 +26,14 @@ class LocalToGlobalIndexMap; namespace ProcessLib { +class SourceTerm; class NodalSourceTerm; struct SourceTermConfig; } // namespace ProcessLib namespace ProcessLib { -std::unique_ptr<NodalSourceTerm> createSourceTerm( +std::unique_ptr<SourceTerm> createSourceTerm( const SourceTermConfig& config, const NumLib::LocalToGlobalIndexMap& dof_table, const MeshLib::Mesh& mesh, const int variable_id, const unsigned integration_order, diff --git a/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.cpp b/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..93a1f5d0adf090026a4bc787f4b9edc402e1700d --- /dev/null +++ b/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.cpp @@ -0,0 +1,50 @@ +/** + * \copyright + * Copyright (c) 2012-2018, 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 "CreateVolumetricSourceTerm.h" + +#include "BaseLib/ConfigTree.h" +#include "BaseLib/FileTools.h" +#include "MeshLib/Mesh.h" +#include "NumLib/DOF/LocalToGlobalIndexMap.h" +#include "ProcessLib/Utils/ProcessUtils.h" +#include "VolumetricSourceTerm.h" + +namespace ProcessLib +{ +std::unique_ptr<SourceTerm> createVolumetricSourceTerm( + BaseLib::ConfigTree const& config, + MeshLib::Mesh const& source_term_mesh, + NumLib::LocalToGlobalIndexMap const& source_term_dof_table, + std::vector<std::unique_ptr<ParameterBase>> const& parameters, + unsigned const integration_order, unsigned const shapefunction_order, + int const variable_id, int const component_id) +{ + //! \ogs_file_param{prj__process_variables__process_variable__source_terms__source_term__type} + config.checkConfigParameter("type", "Volumetric"); + + DBUG("Constructing VolumetricSourceTerm from config."); + + // source term field name + auto const& volumetric_source_term_parameter_name = + //! \ogs_file_param{prj__process_variables__process_variable__source_terms__source_term__Volumetric__parameter} + config.getConfigParameter<std::string>("parameter"); + auto& volumetric_source_term = findParameter<double>( + volumetric_source_term_parameter_name, parameters, 1); + + DBUG("Using '%s` as volumetric source term parameter.", + volumetric_source_term.name.c_str()); + + return std::make_unique<VolumetricSourceTerm>( + source_term_mesh, source_term_dof_table, integration_order, + shapefunction_order, variable_id, component_id, + volumetric_source_term); +} + +} // namespace ProcessLib diff --git a/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.h b/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.h new file mode 100644 index 0000000000000000000000000000000000000000..2f1fcb62c54f9b02116d790d44a1021d71b7bd9f --- /dev/null +++ b/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.h @@ -0,0 +1,43 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <memory> +#include <vector> + +namespace BaseLib +{ +class ConfigTree; +} + +namespace MeshLib +{ +class Mesh; +} + +namespace NumLib +{ +class LocalToGlobalIndexMap; +} + +namespace ProcessLib +{ +struct ParameterBase; +class SourceTerm; + +std::unique_ptr<SourceTerm> createVolumetricSourceTerm( + BaseLib::ConfigTree const& config, + MeshLib::Mesh const& source_term_mesh, + NumLib::LocalToGlobalIndexMap const& source_term_dof_table, + std::vector<std::unique_ptr<ParameterBase>> const& parameters, + unsigned const integration_order, unsigned const shapefunction_order, + int const variable_id, int const component_id); + +} // namespace ProcessLib diff --git a/ProcessLib/SourceTerms/NodalSourceTerm.cpp b/ProcessLib/SourceTerms/NodalSourceTerm.cpp index e621545dce87902e70b728270c4b489b0a478333..04d8619f2ed413923c7fb21239bf2160de672cad 100644 --- a/ProcessLib/SourceTerms/NodalSourceTerm.cpp +++ b/ProcessLib/SourceTerms/NodalSourceTerm.cpp @@ -13,13 +13,14 @@ namespace ProcessLib { -NodalSourceTerm::NodalSourceTerm(const NumLib::LocalToGlobalIndexMap& dof_table, - std::size_t const bulk_mesh_id, - MeshLib::Mesh const& st_mesh, - const int variable_id, - const int component_id, - Parameter<double> const& parameter) - : _dof_table(dof_table), +NodalSourceTerm::NodalSourceTerm( + const NumLib::LocalToGlobalIndexMap& source_term_dof_table, + std::size_t const bulk_mesh_id, + MeshLib::Mesh const& st_mesh, + const int variable_id, + const int component_id, + Parameter<double> const& parameter) + : SourceTerm(source_term_dof_table), _bulk_mesh_id(bulk_mesh_id), _st_mesh(st_mesh), _variable_id(variable_id), @@ -36,8 +37,7 @@ NodalSourceTerm::NodalSourceTerm(const NumLib::LocalToGlobalIndexMap& dof_table, } } -void NodalSourceTerm::integrateNodalSourceTerm(const double t, - GlobalVector& b) const +void NodalSourceTerm::integrate(const double t, GlobalVector& b) const { DBUG("Assemble NodalSourceTerm."); @@ -49,8 +49,8 @@ void NodalSourceTerm::integrateNodalSourceTerm(const double t, auto const node_id = node->getID(); MeshLib::Location const l{_bulk_mesh_id, MeshLib::MeshItemType::Node, bulk_node_ids_map[node_id]}; - auto const index = - _dof_table.getGlobalIndex(l, _variable_id, _component_id); + auto const index = _source_term_dof_table.getGlobalIndex( + l, _variable_id, _component_id); SpatialPosition pos; pos.setNodeID(node_id); diff --git a/ProcessLib/SourceTerms/NodalSourceTerm.h b/ProcessLib/SourceTerms/NodalSourceTerm.h index 4e51bda3caef087031a8753bd2eb9cbc66ff5142..cc22ee10a8110f9f3db01bc2d60ddc538a965c90 100644 --- a/ProcessLib/SourceTerms/NodalSourceTerm.h +++ b/ProcessLib/SourceTerms/NodalSourceTerm.h @@ -9,23 +9,22 @@ #pragma once -#include "NumLib/DOF/LocalToGlobalIndexMap.h" -#include "ProcessLib/Parameter/Parameter.h" +#include "SourceTerm.h" namespace ProcessLib { -class NodalSourceTerm final +class NodalSourceTerm final : public SourceTerm { public: - NodalSourceTerm(const NumLib::LocalToGlobalIndexMap& dof_table, - std::size_t const bulk_mesh_id, - MeshLib::Mesh const& st_mesh, const int variable_id, - const int component_id, Parameter<double> const& parameter); + explicit NodalSourceTerm( + const NumLib::LocalToGlobalIndexMap& source_term_dof_table, + std::size_t const bulk_mesh_id, MeshLib::Mesh const& st_mesh, + const int variable_id, const int component_id, + Parameter<double> const& parameter); - void integrateNodalSourceTerm(const double t, GlobalVector& b) const; + void integrate(const double t, GlobalVector& b) const override; private: - NumLib::LocalToGlobalIndexMap const& _dof_table; std::size_t const _bulk_mesh_id; MeshLib::Mesh const& _st_mesh; int const _variable_id; diff --git a/ProcessLib/SourceTerms/SourceTerm.h b/ProcessLib/SourceTerms/SourceTerm.h new file mode 100644 index 0000000000000000000000000000000000000000..bbbd878a3e9a4e509a8954fc7909393293f20f30 --- /dev/null +++ b/ProcessLib/SourceTerms/SourceTerm.h @@ -0,0 +1,34 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "NumLib/DOF/LocalToGlobalIndexMap.h" +#include "ProcessLib/Parameter/Parameter.h" + +namespace ProcessLib +{ +class SourceTerm +{ +public: + explicit SourceTerm( + const NumLib::LocalToGlobalIndexMap& source_term_dof_table) + : _source_term_dof_table(source_term_dof_table) + { + } + + virtual void integrate(const double t, GlobalVector& b) const = 0; + + virtual ~SourceTerm() = default; + +protected: + NumLib::LocalToGlobalIndexMap const& _source_term_dof_table; +}; + +} // namespace ProcessLib diff --git a/ProcessLib/SourceTerms/SourceTermCollection.cpp b/ProcessLib/SourceTerms/SourceTermCollection.cpp index f0dc7ba5f978af2efc56d50845392cbde6509e38..9636eae275a4460474d486082e03485bd099e18b 100644 --- a/ProcessLib/SourceTerms/SourceTermCollection.cpp +++ b/ProcessLib/SourceTerms/SourceTermCollection.cpp @@ -29,11 +29,10 @@ void SourceTermCollection::addSourceTermsForProcessVariables( } } -void SourceTermCollection::integrateNodalSourceTerms(const double t, - GlobalVector& b) const +void SourceTermCollection::integrate(const double t, GlobalVector& b) const { for (auto const& st : _source_terms) - st->integrateNodalSourceTerm(t, b); + st->integrate(t, b); } } diff --git a/ProcessLib/SourceTerms/SourceTermCollection.h b/ProcessLib/SourceTerms/SourceTermCollection.h index bfa7f5a3478fa6e6d69867f143b05356ccae487c..77f8646c23abb1150f08956522373d991cd17e08 100644 --- a/ProcessLib/SourceTerms/SourceTermCollection.h +++ b/ProcessLib/SourceTerms/SourceTermCollection.h @@ -10,7 +10,7 @@ #pragma once #include "ProcessLib/ProcessVariable.h" -#include "ProcessLib/SourceTerms/NodalSourceTerm.h" +#include "ProcessLib/SourceTerms/SourceTerm.h" namespace ProcessLib { @@ -23,7 +23,7 @@ public: { } - void integrateNodalSourceTerms(const double t, GlobalVector& b) const; + void integrate(const double t, GlobalVector& b) const; void addSourceTermsForProcessVariables( std::vector<std::reference_wrapper<ProcessVariable>> const& @@ -32,7 +32,7 @@ public: unsigned const integration_order); private: - std::vector<std::unique_ptr<NodalSourceTerm>> _source_terms; + std::vector<std::unique_ptr<SourceTerm>> _source_terms; std::vector<std::unique_ptr<ParameterBase>> const& _parameters; }; diff --git a/ProcessLib/SourceTerms/VolumetricSourceTerm.cpp b/ProcessLib/SourceTerms/VolumetricSourceTerm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..166405fa84ce45a1c0ab192e58406847675f7359 --- /dev/null +++ b/ProcessLib/SourceTerms/VolumetricSourceTerm.cpp @@ -0,0 +1,61 @@ +/** + * \copyright + * Copyright (c) 2012-2018, 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 "VolumetricSourceTerm.h" + +#include "ProcessLib/Utils/CreateLocalAssemblers.h" + +namespace ProcessLib +{ +VolumetricSourceTerm::VolumetricSourceTerm( + MeshLib::Mesh const& source_term_mesh, + NumLib::LocalToGlobalIndexMap const& source_term_dof_table, + unsigned const integration_order, unsigned const shapefunction_order, + int const variable_id, int const component_id, + Parameter<double> const& volumetric_source_term) + : SourceTerm(source_term_dof_table), + _volumetric_source_term(volumetric_source_term) +{ + // check basic data consistency + if (variable_id >= + static_cast<int>(source_term_dof_table.getNumberOfVariables())) + { + OGS_FATAL( + "Variable id too high. Actual value: %d, maximum value: %d.", + variable_id, + source_term_dof_table.getNumberOfVariables()); + } + if (component_id >= + source_term_dof_table.getNumberOfVariableComponents(variable_id)) + { + OGS_FATAL( + "Component id too high. Actual value: %d, maximum value: %d.", + component_id, + source_term_dof_table.getNumberOfVariableComponents(variable_id)); + } + + ProcessLib::createLocalAssemblers<VolumetricSourceTermLocalAssembler>( + source_term_mesh.getDimension(), source_term_mesh.getElements(), + source_term_dof_table, shapefunction_order, _local_assemblers, + source_term_mesh.isAxiallySymmetric(), integration_order, + _volumetric_source_term); +} + +void VolumetricSourceTerm::integrate(const double t, + GlobalVector& b) const +{ + DBUG("Assemble VolumetricSourceTerm."); + + // Call global assembler for each local assembly item. + GlobalExecutor::executeMemberOnDereferenced( + &VolumetricSourceTermLocalAssemblerInterface::integrate, + _local_assemblers, _source_term_dof_table, t, b); +} + +} // namespace ProcessLib diff --git a/ProcessLib/SourceTerms/VolumetricSourceTerm.h b/ProcessLib/SourceTerms/VolumetricSourceTerm.h new file mode 100644 index 0000000000000000000000000000000000000000..9f26f93d227613cccd89fa7f23632c8199050dcc --- /dev/null +++ b/ProcessLib/SourceTerms/VolumetricSourceTerm.h @@ -0,0 +1,38 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <memory> +#include <vector> + +#include "SourceTerm.h" +#include "VolumetricSourceTermFEM.h" + +namespace ProcessLib +{ +class VolumetricSourceTerm final : public SourceTerm +{ +public: + VolumetricSourceTerm( + MeshLib::Mesh const& source_term_mesh, + NumLib::LocalToGlobalIndexMap const& source_term_dof_table, + unsigned const integration_order, unsigned const shapefunction_order, + int const variable_id, int const component_id, + Parameter<double> const& volumetric_source_term); + + void integrate(const double t, GlobalVector& b) const; + +private: + Parameter<double> const& _volumetric_source_term; + std::vector<std::unique_ptr<VolumetricSourceTermLocalAssemblerInterface>> + _local_assemblers; +}; + +} // namespace ProcessLib diff --git a/ProcessLib/SourceTerms/VolumetricSourceTermFEM.h b/ProcessLib/SourceTerms/VolumetricSourceTermFEM.h new file mode 100644 index 0000000000000000000000000000000000000000..0cfa15c672b3bf28bf3797ed7845b3ad76da352e --- /dev/null +++ b/ProcessLib/SourceTerms/VolumetricSourceTermFEM.h @@ -0,0 +1,126 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <vector> + +#include "MathLib/LinAlg/Eigen/EigenMapTools.h" +#include "NumLib/DOF/DOFTableUtil.h" +#include "NumLib/Fem/FiniteElement/TemplateIsoparametric.h" +#include "ProcessLib/LocalAssemblerTraits.h" +#include "ProcessLib/Parameter/Parameter.h" +#include "ProcessLib/Utils/InitShapeMatrices.h" + +namespace ProcessLib +{ +template <typename NodalRowVectorType> +struct IntegrationPointData final +{ + IntegrationPointData(NodalRowVectorType const& N_, + double const& integration_weight_) + : integration_weight_times_N(N_ * integration_weight_) + {} + + NodalRowVectorType const integration_weight_times_N; + + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; +}; + + +class VolumetricSourceTermLocalAssemblerInterface +{ +public: + virtual void integrate( + std::size_t const id, + NumLib::LocalToGlobalIndexMap const& source_term_dof_table, + double const t, GlobalVector& b) = 0; + virtual ~VolumetricSourceTermLocalAssemblerInterface() = default; +}; + +const unsigned NUM_NODAL_DOF = 1; + +template <typename ShapeFunction, typename IntegrationMethod, + unsigned GlobalDim> +class VolumetricSourceTermLocalAssembler final + : public VolumetricSourceTermLocalAssemblerInterface +{ + using ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>; + + using LocalAssemblerTraits = ProcessLib::LocalAssemblerTraits< + ShapeMatricesType, ShapeFunction::NPOINTS, NUM_NODAL_DOF, GlobalDim>; + + using NodalVectorType = typename LocalAssemblerTraits::LocalVector; + using NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType; + +public: + VolumetricSourceTermLocalAssembler( + MeshLib::Element const& element, + std::size_t const local_matrix_size, + bool is_axially_symmetric, + unsigned const integration_order, + Parameter<double> const& volumetric_source_term) + : _volumetric_source_term(volumetric_source_term), + _integration_method(integration_order), + _local_rhs(local_matrix_size) + { + unsigned const n_integration_points = + _integration_method.getNumberOfPoints(); + + auto const shape_matrices = + initShapeMatrices<ShapeFunction, ShapeMatricesType, + IntegrationMethod, GlobalDim>( + element, is_axially_symmetric, _integration_method); + + for (unsigned ip = 0; ip < n_integration_points; ip++) + { + _ip_data.emplace_back( + shape_matrices[ip].N, + _integration_method.getWeightedPoint(ip).getWeight() * + shape_matrices[ip].integralMeasure * + shape_matrices[ip].detJ); + } + } + + void integrate(std::size_t const id, + NumLib::LocalToGlobalIndexMap const& source_term_dof_table, + double const t, GlobalVector& b) override + { + _local_rhs.setZero(); + + unsigned const n_integration_points = + _integration_method.getNumberOfPoints(); + + SpatialPosition pos; + pos.setElementID(id); + + for (unsigned ip = 0; ip < n_integration_points; ip++) + { + pos.setIntegrationPoint(ip); + auto const st_val = _volumetric_source_term(t, pos)[0]; + + _local_rhs.noalias() += + st_val * _ip_data[ip].integration_weight_times_N; + } + auto const indices = NumLib::getIndices(id, source_term_dof_table); + b.add(indices, _local_rhs); + } + +private: + Parameter<double> const& _volumetric_source_term; + + IntegrationMethod const _integration_method; + std::vector< + IntegrationPointData<NodalRowVectorType>, + Eigen::aligned_allocator<IntegrationPointData<NodalRowVectorType>>> + _ip_data; + NodalVectorType _local_rhs; +}; + +} // namespace ProcessLib diff --git a/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1e2_volumetricsourceterm.prj b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1e2_volumetricsourceterm.prj new file mode 100644 index 0000000000000000000000000000000000000000..8a0e5fed3b5875dbbabb80062b37968aa08e0961 --- /dev/null +++ b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1e2_volumetricsourceterm.prj @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<OpenGeoSysProject> + <meshes> + <mesh>square_1x1_quad_1e2.vtu</mesh> + <mesh>square_1x1_quad_1e2_geometry_right.vtu</mesh> + <mesh>square_1x1_quad_1e2_geometry_left.vtu</mesh> + </meshes> + <processes> + <process> + <name>GW23</name> + <type>GROUNDWATER_FLOW</type> + <integration_order>2</integration_order> + <hydraulic_conductivity>K</hydraulic_conductivity> + <process_variables> + <process_variable>pressure</process_variable> + </process_variables> + <secondary_variables> + <secondary_variable type="static" internal_name="darcy_velocity" output_name="v"/> + </secondary_variables> + </process> + </processes> + <time_loop> + <processes> + <process ref="GW23"> + <nonlinear_solver>basic_picard</nonlinear_solver> + <convergence_criterion> + <type>DeltaX</type> + <norm_type>NORM2</norm_type> + <abstol>1.e-6</abstol> + </convergence_criterion> + <time_discretization> + <type>BackwardEuler</type> + </time_discretization> + <output> + <variables> + <variable> pressure </variable> + <variable> v </variable> + </variables> + </output> + <time_stepping> + <type>SingleStep</type> + </time_stepping> + </process> + </processes> + <output> + <type>VTK</type> + <prefix>square_1e2_volumetricsourceterm</prefix> + </output> + </time_loop> + <nonlinear_solvers> + <nonlinear_solver> + <name>basic_picard</name> + <type>Picard</type> + <max_iter>10</max_iter> + <linear_solver>general_linear_solver</linear_solver> + </nonlinear_solver> + </nonlinear_solvers> + <linear_solvers> + <linear_solver> + <name>general_linear_solver</name> + <lis>-i cg -p jacobi -tol 1e-16 -maxiter 10000</lis> + <eigen> + <solver_type>CG</solver_type> + <precon_type>DIAGONAL</precon_type> + <max_iteration_step>10000</max_iteration_step> + <error_tolerance>1e-16</error_tolerance> + </eigen> + <petsc> + <prefix>gw</prefix> + <parameters>-gw_ksp_type cg -gw_pc_type bjacobi -gw_ksp_rtol 1e-16 -gw_ksp_max_it 10000</parameters> + </petsc> + </linear_solver> + </linear_solvers> + <parameters> + <parameter> + <name>K</name> + <type>Constant</type> + <value>1</value> + </parameter> + <parameter> + <name>p0</name> + <type>Constant</type> + <value>0</value> + </parameter> + <parameter> + <name>p_Dirichlet_left</name> + <type>Constant</type> + <value>2</value> + </parameter> + <parameter> + <name>p_Dirichlet_right</name> + <type>Constant</type> + <value>1</value> + </parameter> + <parameter> + <name>volumetric_source_term_parameter</name> + <type>Constant</type> + <value>1</value> + </parameter> + </parameters> + <process_variables> + <process_variable> + <name>pressure</name> + <components>1</components> + <order>1</order> + <initial_condition>p0</initial_condition> + <boundary_conditions> + <boundary_condition> + <mesh>square_1x1_quad_1e2_geometry_left</mesh> + <type>Dirichlet</type> + <parameter>p_Dirichlet_left</parameter> + </boundary_condition> + <boundary_condition> + <mesh>square_1x1_quad_1e2_geometry_right</mesh> + <type>Dirichlet</type> + <parameter>p_Dirichlet_right</parameter> + </boundary_condition> + </boundary_conditions> + <source_terms> + <source_term> + <mesh>square_1x1_quad_1e2</mesh> + <type>Volumetric</type> + <parameter>volumetric_source_term_parameter</parameter> + </source_term> + </source_terms> + </process_variable> + </process_variables> +</OpenGeoSysProject> diff --git a/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1e3_volumetricsourceterm.prj b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1e3_volumetricsourceterm.prj new file mode 100644 index 0000000000000000000000000000000000000000..23892db304c4d425f47e5de5e62d20f9460653ef --- /dev/null +++ b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1e3_volumetricsourceterm.prj @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<OpenGeoSysProject> + <meshes> + <mesh>square_1x1_quad_1e3.vtu</mesh> + <mesh>square_1x1_quad_1e3_geometry_right.vtu</mesh> + <mesh>square_1x1_quad_1e3_geometry_left.vtu</mesh> + </meshes> + <processes> + <process> + <name>GW23</name> + <type>GROUNDWATER_FLOW</type> + <integration_order>2</integration_order> + <hydraulic_conductivity>K</hydraulic_conductivity> + <process_variables> + <process_variable>pressure</process_variable> + </process_variables> + <secondary_variables> + <secondary_variable type="static" internal_name="darcy_velocity" output_name="v"/> + </secondary_variables> + </process> + </processes> + <time_loop> + <processes> + <process ref="GW23"> + <nonlinear_solver>basic_picard</nonlinear_solver> + <convergence_criterion> + <type>DeltaX</type> + <norm_type>NORM2</norm_type> + <abstol>1.e-6</abstol> + </convergence_criterion> + <time_discretization> + <type>BackwardEuler</type> + </time_discretization> + <output> + <variables> + <variable> pressure </variable> + <variable> v </variable> + </variables> + </output> + <time_stepping> + <type>SingleStep</type> + </time_stepping> + </process> + </processes> + <output> + <type>VTK</type> + <prefix>square_1e3_volumetricsourceterm</prefix> + </output> + </time_loop> + <nonlinear_solvers> + <nonlinear_solver> + <name>basic_picard</name> + <type>Picard</type> + <max_iter>10</max_iter> + <linear_solver>general_linear_solver</linear_solver> + </nonlinear_solver> + </nonlinear_solvers> + <linear_solvers> + <linear_solver> + <name>general_linear_solver</name> + <lis>-i cg -p jacobi -tol 1e-16 -maxiter 10000</lis> + <eigen> + <solver_type>CG</solver_type> + <precon_type>DIAGONAL</precon_type> + <max_iteration_step>10000</max_iteration_step> + <error_tolerance>1e-16</error_tolerance> + </eigen> + <petsc> + <prefix>gw</prefix> + <parameters>-gw_ksp_type cg -gw_pc_type bjacobi -gw_ksp_rtol 1e-16 -gw_ksp_max_it 10000</parameters> + </petsc> + </linear_solver> + </linear_solvers> + <parameters> + <parameter> + <name>K</name> + <type>Constant</type> + <value>1</value> + </parameter> + <parameter> + <name>p0</name> + <type>Constant</type> + <value>0</value> + </parameter> + <parameter> + <name>p_Dirichlet_left</name> + <type>Constant</type> + <value>2</value> + </parameter> + <parameter> + <name>p_Dirichlet_right</name> + <type>Constant</type> + <value>1</value> + </parameter> + <parameter> + <name>volumetric_source_term_parameter</name> + <type>Constant</type> + <value>1</value> + </parameter> + </parameters> + <process_variables> + <process_variable> + <name>pressure</name> + <components>1</components> + <order>1</order> + <initial_condition>p0</initial_condition> + <boundary_conditions> + <boundary_condition> + <mesh>square_1x1_quad_1e3_geometry_left</mesh> + <type>Dirichlet</type> + <parameter>p_Dirichlet_left</parameter> + </boundary_condition> + <boundary_condition> + <mesh>square_1x1_quad_1e3_geometry_right</mesh> + <type>Dirichlet</type> + <parameter>p_Dirichlet_right</parameter> + </boundary_condition> + </boundary_conditions> + <source_terms> + <source_term> + <mesh>square_1x1_quad_1e3</mesh> + <type>Volumetric</type> + <parameter>volumetric_source_term_parameter</parameter> + </source_term> + </source_terms> + </process_variable> + </process_variables> +</OpenGeoSysProject> diff --git a/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e2_geometry_left.vtu b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e2_geometry_left.vtu new file mode 100644 index 0000000000000000000000000000000000000000..d9b5beb7201036cdca9373ddf1abae9f7f9904fc --- /dev/null +++ b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e2_geometry_left.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:718341d2a0bc33a25423a49642d5cbd08f060d5ad1222ae25b0bab77642bdfe0 +size 2096 diff --git a/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e2_geometry_right.vtu b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e2_geometry_right.vtu new file mode 100644 index 0000000000000000000000000000000000000000..5adcb1cdd6f43f529b2b4099b408463c9a21b255 --- /dev/null +++ b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e2_geometry_right.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9aa273e7328b89475393856c9bfa0dc47d420220293f4d5cfcb1e91a7d418428 +size 2108 diff --git a/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e2_volumetricsourceterm_analytical_solution.vtu b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e2_volumetricsourceterm_analytical_solution.vtu new file mode 100644 index 0000000000000000000000000000000000000000..197e591e1416522e9c7647b17666409e7bb5e79c --- /dev/null +++ b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e2_volumetricsourceterm_analytical_solution.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf14df363af144fb3e9674e4c96a59e82c480c9a46a7b3f7de93fccbc96604cd +size 7066 diff --git a/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e3_geometry_left.vtu b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e3_geometry_left.vtu new file mode 100644 index 0000000000000000000000000000000000000000..4c238eff24fa1a4d843ab1e4826f708f2d6b8126 --- /dev/null +++ b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e3_geometry_left.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80905f821e8267dad85ae81560007ecb77be79f7770e4221dae5e53aa1523277 +size 4006 diff --git a/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e3_geometry_right.vtu b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e3_geometry_right.vtu new file mode 100644 index 0000000000000000000000000000000000000000..284adf21e4a1760e91b97c922fbf38b4f565a458 --- /dev/null +++ b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e3_geometry_right.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a155a8b533695b0c045ec6c6296f357f892a0aa56cf05a127feabc3ec9fd2261 +size 4020 diff --git a/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e3_volumetricsourceterm_analytical_solution.vtu b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e3_volumetricsourceterm_analytical_solution.vtu new file mode 100644 index 0000000000000000000000000000000000000000..0c91b2345ab4b415c3804114e7d13df860e26a78 --- /dev/null +++ b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_1e3_volumetricsourceterm_analytical_solution.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28a49024ee8db27388b8f77d5917b22e968436e227efb4afd59c94c7afc25728 +size 40894 diff --git a/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_geometry_right.vtu b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_geometry_right.vtu new file mode 100644 index 0000000000000000000000000000000000000000..5adcb1cdd6f43f529b2b4099b408463c9a21b255 --- /dev/null +++ b/Tests/Data/Elliptic/square_1x1_GroundWaterFlow/square_1x1_quad_geometry_right.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9aa273e7328b89475393856c9bfa0dc47d420220293f4d5cfcb1e91a7d418428 +size 2108 diff --git a/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet-volumetric-source-term.pandoc b/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet-volumetric-source-term.pandoc new file mode 100644 index 0000000000000000000000000000000000000000..50905f96bde94a073e0204333462c4502108eba1 --- /dev/null +++ b/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet-volumetric-source-term.pandoc @@ -0,0 +1,111 @@ ++++ +date = "2018-09-25T08:17:39+01:00" +title = "Groundwater Flow (Volumetric Source Term)" +project = "Elliptic/square_1x1_GroundWaterFlow/square_1e2_volumetricsourceterm.prj" +author = "Tom Fischer" +weight = 102 + +aliases = [ "/docs/benchmarks/" ] # First benchmark page + +[menu] + [menu.benchmarks] + parent = "elliptic" + ++++ + +{{< data-link >}} + +## Equations + +We start with Poisson equation: +$$ +\begin{equation} +k\; \Delta p = Q \quad \text{in }\Omega +\end{equation}$$ +w.r.t boundary conditions +$$ +\eqalign{ +p(x) = g_D(x) &\quad \text{on }\Gamma_D,\cr +k\;{\partial p(x) \over \partial n} = g_N(x) &\quad \text{on }\Gamma_N, +}$$ + +where $p$ could be the pressure, the subscripts $D$ and $N$ denote the Dirichlet- and Neumann-type boundary conditions, $n$ is the normal vector pointing outside of $\Omega$, and $\Gamma = \Gamma_D \cup \Gamma_N$ and $\Gamma_D \cap \Gamma_N = \emptyset$. + +## Problem specification and analytical solution + +We solve the Poisson equation on a square domain $[0\times 1]^2$ with $k = 1$ w.r.t. the specific boundary conditions: +$$ +\eqalign{ +p(x,y) = 2 &\quad \text{on } (x=0,y) \subset \Gamma_D,\cr +p(x,y) = 1 &\quad \text{on } (x=1,y) \subset \Gamma_D,\cr +k\;{\partial p(x,y) \over \partial n} = 0 &\quad \text{on }\Gamma_N. +}$$ +and the source term is $Q=1$. + +The solution of this problem is +$$ +p(x,y) = - \frac{1}{2} (x^2 + x) + 2. +$$ + +## Input files + +The main project file is `square_1e2_volumetricsourceterm.prj`. It describes the +processes to be solved and the related process variables together with their +initial and boundary conditions. It also references the bulk mesh and the +boundary meshes associated with the bulk mesh. + +The input mesh `square_1x1_quad_1e2.vtu` is stored in the VTK file format and can be directly visualized in Paraview for example. + +## Running simulation + +To start the simulation (after successful compilation) run: +```bash +$ ogs square_1e2_volumetricsourceterm.prj +``` + +It will produce some output and write the computed result into the +`square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000.vtu`, which can be +directly visualized and analysed in paraview for example. + +The output on the console will be similar to the following on: +``` +info: ConstantParameter: K +info: ConstantParameter: p0 +info: ConstantParameter: p_Dirichlet_left +info: ConstantParameter: p_Dirichlet_right +info: ConstantParameter: volumetric_source_term_parameter +info: Initialize processes. +info: Solve processes. +info: [time] Output of timestep 0 took 0.000408888 s. +info: === Time stepping at step #1 and time 1 with step size 1 +info: [time] Assembly took 0.000366926 s. +info: [time] Applying Dirichlet BCs took 3.76701e-05 s. +info: ------------------------------------------------------------------ +info: *** Eigen solver computation +info: -> solve with CG (precon DIAGONAL) +info: iteration: 9/10000 +info: residual: 7.661918e-17 + +info: ------------------------------------------------------------------ +info: [time] Linear solver took 0.000194073 s. +info: [time] Iteration #1 took 0.000657082 s. +info: [time] Solving process #0 took 0.000686884 s in time step #1 +info: [time] Time step #1 took 0.000750065 s. +info: [time] Output of timestep 1 took 0.000280857 s. +info: The whole computation of the time stepping took 1 steps, in which + the accepted steps are 1, and the rejected steps are 0. + +info: [time] Execution took 0.0493069 s. +info: OGS terminated on 2018-09-25 08:00:58+020 +``` + +## Results and evaluation + +### Comparison of the analytical solution and the computed solution + +{{< img src="../square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000_Pressure_AnalyticalSolution_VolumetricSourceTerm.png" >}} +There is no visible difference between the computed pressure and the analytical +solution. +{{< img src="../square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000_Diff_Pressure_AnalyticalSolution_VolumetricSourceTerm.png" >}} +The difference between the pressure and the analytical solution is the range of +machine accuracy. diff --git a/web/content/docs/benchmarks/elliptic/square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000_Diff_Pressure_AnalyticalSolution_VolumetricSourceTerm.png b/web/content/docs/benchmarks/elliptic/square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000_Diff_Pressure_AnalyticalSolution_VolumetricSourceTerm.png new file mode 100644 index 0000000000000000000000000000000000000000..ab8c1bb643872e7a4470e8065e68906c635cc841 --- /dev/null +++ b/web/content/docs/benchmarks/elliptic/square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000_Diff_Pressure_AnalyticalSolution_VolumetricSourceTerm.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c063b973e6e2aef887077ab627ba273727ccd6d4ae964d27cfc25779972532b +size 16954 diff --git a/web/content/docs/benchmarks/elliptic/square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000_Pressure_AnalyticalSolution_VolumetricSourceTerm.png b/web/content/docs/benchmarks/elliptic/square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000_Pressure_AnalyticalSolution_VolumetricSourceTerm.png new file mode 100644 index 0000000000000000000000000000000000000000..ee61773b549609b6a470bcaed49e390ab3de7898 --- /dev/null +++ b/web/content/docs/benchmarks/elliptic/square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000_Pressure_AnalyticalSolution_VolumetricSourceTerm.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8df95d8054c45644cfc9f6185b2c9a120fedf51c400bc6dd8e450ba80313bfd +size 11378