NuTo
Numerics Tool
|
#include <fstream>
#include <sys/stat.h>
#include <sys/time.h>
#include <boost/progress.hpp>
#include <nuto/math/SparseMatrixCSRGeneral.h>
#include <nuto/mechanics/constitutive/multiPhysics/ConstitutiveStaticDataMultiPhysics.h>
#include <nuto/mechanics/constitutive/moistureTransport/ConstitutiveStaticDataMoistureTransport.h>
#include <nuto/mechanics/nodes/NodeDof.h>
#include <nuto/mechanics/nodes/NodeCoordinates.h>
#include <nuto/mechanics/structures/unstructured/Structure.h>
#include "nuto/mechanics/timeIntegration/CrankNicolsonEvaluate.h"
#include <nuto/metamodel/PolynomialLeastSquaresFitting.h>
#include <nuto/mechanics/structures/StructureOutputFullVectorDouble.h>
#include <nuto/mechanics/structures/StructureOutputSparseMatrix.h>
Variables | |
unsigned int | NumNodesX = NumElementsX + 1 |
unsigned int | NumNodesY = NumElementsY + 1 |
double | Thickness = 0.04 |
double | delta_t = 1.0 / 1.0 * 1.0 * 24.0 * 60.0 * 60.0 |
double | SimulationTime = 1.0 / 1.0 * 1.0 * 24.0 * 60.0 * 60.0 |
double | BC_TransitionTime = 24.0 * 60.0 * 60.0 |
double | InitialRelativeHumidity = 0.95 |
double | InitialWaterVolumeFraction = 0.03 |
double | Density = 1.0 |
double | PoissonRatio = 0.15 |
double | YoungsModulus = 30.0 * 10e9 |
double | MassExchangeRate = 3.42e-7 |
double | Porosity = 0.25 |
double | VaporPhaseDiffusionCoefficient = 3.9e-12 |
double | VaporPhaseDiffusionExponent = 1.0 |
double | VaporPhaseSaturationDensity = 0.0173 |
double | WaterPhaseDensity = 999.97 |
double | WaterPhaseDiffusionCoefficient = 1.17e-7 |
double | WaterPhaseDiffusionExponent = 2.0 |
double | BC_RelativeHumidity = 0.15 |
double | BC_Surface_Moisture_Transfer_RH = 1.0e-10 * delta_t |
double | BC_Surface_Moisture_Transfer_WVF = 1.0e-7 * delta_t |
bool | SorptionHistoryDesorption = true |
double | Ka = 0.26 |
double | Kd = 0.56 |
NuTo::PolynomialLeastSquaresFitting | AdsorptionFit |
NuTo::PolynomialLeastSquaresFitting | DesorptionFit |
double | MaxResidual = 1.0e-6 |
int | mySection = myStructure.SectionCreate("Plane_Stress") |
int | ConstLawDryingShrinkage = myStructure.ConstitutiveLawCreate("DryingShrinkage") |
int | ConstLawLinearElastic = myStructure.ConstitutiveLawCreate("LinearElasticEngineeringStress") |
int | ConstLawMoistureTransport = myStructure.ConstitutiveLawCreate("MoistureTransport") |
int | ConstLawMultiPhysics = myStructure.ConstitutiveLawCreate("MultiPhysics") |
double | DeltaX = Length / (NumNodesX - 1) |
double | DeltaY = Height / (NumNodesY - 1) |
int | myInterpolationType = myStructure.InterpolationTypeCreate("Quad2D") |
NNodes = myStructure.GetNumNodes() | |
int | GRPNodes_Left = myStructure.GroupCreate("Nodes") |
int | Direction = 0 |
double | Min = 0. - 0.01 * ElementLength |
double | Max = 0. + 0.01 * ElementLength |
int | GRPNodes_Right = myStructure.GroupCreate("Nodes") |
auto | PickNodeFunction |
int | GRPNodes_Center = myStructure.GroupCreate("Nodes") |
auto | PickSingleNodeLeftFunction |
int | GRPNodes_SingleNodeLeft = myStructure.GroupCreate("Nodes") |
auto | PickSingleNodeRightFunction |
int | GRPNodes_SingleNodeRight = myStructure.GroupCreate("Nodes") |
int | nodeGroupBoundary = myStructure.GroupCreate("NODES") |
auto | GetBoundaryNodesLambda |
int | elemGroupBoundary = myStructure.GroupCreate("ELEMENTS") |
int | BoundaryNodeID = myStructure.NodeCreateDOFs("RELATIVEHUMIDITY") |
auto | RelativeHumidityFunc |
int | BoundaryConstraint = myStructure.ConstraintLinearSetRelativeHumidityNode(BoundaryNodeID, 1.0) |
DesorptionFit AddBoundaryCondition | ( | 0. | 0, |
0. | 0 | ||
) |
DesorptionFit AddBoundaryCondition | ( | 1. | 0, |
0. | 141 | ||
) |
myStructure BoundaryElementsCreate | ( | elemGroupBoundary | , |
nodeGroupBoundary | , | ||
myStructure. | NodeGetNodePtrBoundaryNodeID | ||
) |
DesorptionFit BuildDerived | ( | ) |
myStructure CalculateMaximumIndependentSets | ( | ) |
myStructure ConstitutiveLawMultiPhysicsAddConstitutiveLaw | ( | ConstLawMultiPhysics | , |
ConstLawDryingShrinkage | |||
) |
myStructure ConstitutiveLawMultiPhysicsAddConstitutiveLaw | ( | ConstLawMultiPhysics | , |
ConstLawLinearElastic | |||
) |
myStructure ConstitutiveLawMultiPhysicsAddConstitutiveLaw | ( | ConstLawMultiPhysics | , |
ConstLawMoistureTransport | |||
) |
myStructure ConstitutiveLawSetParameterBool | ( | ConstLawMultiPhysics | , |
"ENABLE_MODIFIED_TANGENTIAL_STIFFNESS" | , | ||
EnableModiefiedTangentialStiffness | |||
) |
myStructure ConstitutiveLawSetParameterBool | ( | ConstLawMultiPhysics | , |
"enable_sorption_hysteresis" | , | ||
EnableSorptionHysteresis | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
NuTo::Constitutive::eConstitutiveParameter::YOUNGS_MODULUS | , | ||
YoungsModulus | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
NuTo::Constitutive::eConstitutiveParameter::POISSONS_RATIO | , | ||
PoissonRatio | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
NuTo::Constitutive::eConstitutiveParameter::DENSITY | , | ||
Density | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"boundary_TRANSPORT_CONSTANT_GAS_PHASE" | , | ||
BC_Surface_Moisture_Transfer_RH | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"BOUNDARY_TRANSPORT_CONSTANT_WATER_PHASE" | , | ||
BC_Surface_Moisture_Transfer_WVF | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"DENSITY_WATER_PHASE" | , | ||
WaterPhaseDensity | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"DIFFUSION_CONSTANT_GAS_PHASE" | , | ||
VaporPhaseDiffusionCoefficient | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"DIFFUSION_CONSTANT_WATER_PHASE" | , | ||
WaterPhaseDiffusionCoefficient | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"DIFFUSION_EXPONENT_GAS_PHASE" | , | ||
VaporPhaseDiffusionExponent | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"DIFFUSION_EXPONENT_WATER_PHASE" | , | ||
WaterPhaseDiffusionExponent | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"GRADIENT_CORRECTION_ADSORPTION_DESORPTION" | , | ||
Kd | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"GRADIENT_CORRECTION_DESORPTION_ADSORPTION" | , | ||
Ka | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"MASS_EXCHANGE_RATE" | , | ||
MassExchangeRate | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"POROSITY" | , | ||
Porosity | |||
) |
myStructure ConstitutiveLawSetParameterDouble | ( | ConstLawMultiPhysics | , |
"SATURATION_DENSITY_GAS_PHASE" | , | ||
VaporPhaseSaturationDensity | |||
) |
myStructure ConstitutiveLawSetParameterFullVectorDouble | ( | ConstLawMultiPhysics | , |
"polynomial_COEFFICIENTS_ADSORPTION" | , | ||
AdsorptionFit. | GetPolynomialCoefficients() | ||
) |
myStructure ConstitutiveLawSetParameterFullVectorDouble | ( | ConstLawMultiPhysics | , |
"POLYNOMIAL_COEFFICIENTS_DESORPTION" | , | ||
DesorptionFit. | GetPolynomialCoefficients() | ||
) |
myStructure ConstraintLinearSetDisplacementNodeGroup | ( | GRPNodes_SingleNodeLeft | , |
DirectionX | , | ||
0 | |||
) |
myStructure ConstraintLinearSetDisplacementNodeGroup | ( | GRPNodes_SingleNodeLeft | , |
DirectionY | , | ||
0 | |||
) |
myStructure ConstraintLinearSetDisplacementNodeGroup | ( | GRPNodes_SingleNodeRight | , |
DirectionY | , | ||
0 | |||
) |
NuTo::FullVector<double, Eigen::Dynamic> Coordinates | ( | 2 | ) |
NuTo::FullMatrix<double, Eigen::Dynamic, Eigen::Dynamic> DirectionX | ( | 2 | , |
1 | |||
) |
NuTo::FullMatrix<double, Eigen::Dynamic, Eigen::Dynamic> DirectionY | ( | 2 | , |
1 | |||
) |
myStructure ElementTotalConvertToInterpolationType | ( | ) |
myStructure ElementTotalSetSection | ( | mySection | ) |
for | ( | ) |
myStructure GroupAddElementsFromNodes | ( | elemGroupBoundary | , |
nodeGroupBoundary | , | ||
false | |||
) |
myStructure GroupAddNodeCoordinateRange | ( | GRPNodes_Left | , |
Direction | , | ||
Min | , | ||
Max | |||
) |
myStructure GroupAddNodeCoordinateRange | ( | GRPNodes_Right | , |
Direction | , | ||
Min | , | ||
Max | |||
) |
myStructure GroupAddNodeFunction | ( | GRPNodes_Center | , |
PickNodeFunction | |||
) |
myStructure GroupAddNodeFunction | ( | GRPNodes_SingleNodeLeft | , |
PickSingleNodeLeftFunction | |||
) |
myStructure GroupAddNodeFunction | ( | GRPNodes_SingleNodeRight | , |
PickSingleNodeRightFunction | |||
) |
myStructure GroupAddNodeFunction | ( | nodeGroupBoundary | , |
GetBoundaryNodesLambda | |||
) |
myStructure InterpolationTypeAdd | ( | myInterpolationType | , |
NuTo::Node::COORDINATES | , | ||
NuTo::Interpolation::eTypeOrder::EQUIDISTANT1 | |||
) |
myStructure InterpolationTypeAdd | ( | myInterpolationType | , |
NuTo::Node::DISPLACEMENTS | , | ||
NuTo::Interpolation::eTypeOrder::EQUIDISTANT1 | |||
) |
myStructure InterpolationTypeAdd | ( | myInterpolationType | , |
NuTo::Node::RELATIVEHUMIDITY | , | ||
NuTo::Interpolation::eTypeOrder::EQUIDISTANT1 | |||
) |
myStructure InterpolationTypeAdd | ( | myInterpolationType | , |
NuTo::Node::WATERVOLUMEFRACTION | , | ||
NuTo::Interpolation::eTypeOrder::EQUIDISTANT1 | |||
) |
NuTo::Structure myStructure | ( | 2 | ) |
myStructure NodeBuildGlobalDofs | ( | ) |
int NodeNum | ( | 0 | ) |
NuTo::FullVector<int, Eigen::Dynamic> Nodes | ( | 4 | ) |
myStructure SectionSetThickness | ( | mySection | , |
Thickness | |||
) |
DesorptionFit SetDegree | ( | 3 | ) |
myStructure SetNumProcessors | ( | 1 | ) |
myStructure SetNumTimeDerivatives | ( | 2 | ) |
myStructure SetShowTime | ( | false | ) |
AdsorptionFit SetSupportPoints | ( | 1 | , |
1 | , | ||
x_Values_Ad. | Trans(), | ||
y_Values_Ad. | Trans() | ||
) |
DesorptionFit SetSupportPoints | ( | 1 | , |
1 | , | ||
x_Values_De. | Trans(), | ||
y_Values_De. | Trans() | ||
) |
DirectionX SetValue | ( | 0 | , |
0 | , | ||
1. | 0 | ||
) |
DirectionY SetValue | ( | 1 | , |
0 | , | ||
1. | 0 | ||
) |
std::cout<< "Solver not available - can't solve system of equations "<< std::endl;int main(){try{bool EnableSorptionHysteresis=false;bool EnableModiefiedTangentialStiffness=false;unsigned int NNodes;double Length=0.16;double Height=0.04;unsigned int NumElementsX=32;unsigned int NumElementsY=8;double ElementLength=Length/static_cast< double > | ( | NumElementsX | ) |
myStructure UseMaximumIndependentSets | ( | true | ) |
NuTo::FullVector<double, Eigen::Dynamic> x_Values_Ad | ( | {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9} | ) |
NuTo::FullVector<double, Eigen::Dynamic> x_Values_De | ( | {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9} | ) |
NuTo::FullVector<double, Eigen::Dynamic> y_Values_Ad | ( | {0.017, 0.03, 0.04, 0.048, 0.056, 0.066, 0.077, 0.092, 0.114} | ) |
NuTo::FullVector<double, Eigen::Dynamic> y_Values_De | ( | {0.022, 0.039, 0.052, 0.062, 0.072, 0.083, 0.097, 0.118, 0.145} | ) |
NuTo::PolynomialLeastSquaresFitting AdsorptionFit |
double BC_RelativeHumidity = 0.15 |
double BC_Surface_Moisture_Transfer_RH = 1.0e-10 * delta_t |
double BC_Surface_Moisture_Transfer_WVF = 1.0e-7 * delta_t |
double BC_TransitionTime = 24.0 * 60.0 * 60.0 |
int BoundaryConstraint = myStructure.ConstraintLinearSetRelativeHumidityNode(BoundaryNodeID, 1.0) |
int BoundaryNodeID = myStructure.NodeCreateDOFs("RELATIVEHUMIDITY") |
int ConstLawDryingShrinkage = myStructure.ConstitutiveLawCreate("DryingShrinkage") |
int ConstLawLinearElastic = myStructure.ConstitutiveLawCreate("LinearElasticEngineeringStress") |
int ConstLawMoistureTransport = myStructure.ConstitutiveLawCreate("MoistureTransport") |
int ConstLawMultiPhysics = myStructure.ConstitutiveLawCreate("MultiPhysics") |
double delta_t = 1.0 / 1.0 * 1.0 * 24.0 * 60.0 * 60.0 |
double DeltaX = Length / (NumNodesX - 1) |
double DeltaY = Height / (NumNodesY - 1) |
double Density = 1.0 |
NuTo::PolynomialLeastSquaresFitting DesorptionFit |
Direction = 0 |
int elemGroupBoundary = myStructure.GroupCreate("ELEMENTS") |
auto GetBoundaryNodesLambda |
int GRPNodes_Center = myStructure.GroupCreate("Nodes") |
int GRPNodes_Left = myStructure.GroupCreate("Nodes") |
int GRPNodes_Right = myStructure.GroupCreate("Nodes") |
int GRPNodes_SingleNodeLeft = myStructure.GroupCreate("Nodes") |
int GRPNodes_SingleNodeRight = myStructure.GroupCreate("Nodes") |
double InitialRelativeHumidity = 0.95 |
InitialWaterVolumeFraction = 0.03 |
double Ka = 0.26 |
double Kd = 0.56 |
double MassExchangeRate = 3.42e-7 |
Max = 0. + 0.01 * ElementLength |
double MaxResidual = 1.0e-6 |
Min = 0. - 0.01 * ElementLength |
int myInterpolationType = myStructure.InterpolationTypeCreate("Quad2D") |
int mySection = myStructure.SectionCreate("Plane_Stress") |
NNodes = myStructure.GetNumNodes() |
int nodeGroupBoundary = myStructure.GroupCreate("NODES") |
unsigned int NumNodesX = NumElementsX + 1 |
unsigned int NumNodesY = NumElementsY + 1 |
auto PickNodeFunction |
auto PickSingleNodeLeftFunction |
auto PickSingleNodeRightFunction |
double PoissonRatio = 0.15 |
double Porosity = 0.25 |
auto RelativeHumidityFunc |
double SimulationTime = 1.0 / 1.0 * 1.0 * 24.0 * 60.0 * 60.0 |
bool SorptionHistoryDesorption = true |
double Thickness = 0.04 |
double VaporPhaseDiffusionCoefficient = 3.9e-12 |
double VaporPhaseDiffusionExponent = 1.0 |
double VaporPhaseSaturationDensity = 0.0173 |
double WaterPhaseDensity = 999.97 |
double WaterPhaseDiffusionCoefficient = 1.17e-7 |
double WaterPhaseDiffusionExponent = 2.0 |
double YoungsModulus = 30.0 * 10e9 |