// Copyright (C) Stichting Deltares 2017. All rights reserved.
//
// This file is part of the DAM Engine.
//
// The DAM Engine 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 .
//
// All names, logos, and references to "Deltares" are registered trademarks of
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
using System;
using Deltares.DamEngine.Data.Standard;
using Deltares.DamEngine.Data.Standard.Language;
namespace Deltares.DamEngine.Data.Geotechnics
{
///
/// Soil class, representing a specific soil material and its properties
///
[Serializable]
public class Soil : IName
{
// Stability properties
private string name = "";
private DilatancyType dilatancyType = DilatancyType.Phi;
private ShearStrengthModel shearStrengthModel = ShearStrengthModel.CPhi;
private double belowPhreaticLevel = double.NaN;
private double abovePhreaticLevel = double.NaN;
private double dryUnitWeight = double.NaN;
private double cohesion = double.NaN;
private double frictionAngle = double.NaN;
private double poP = double.NaN;
private double ocr = double.NaN;
private double ratioCuPc = double.NaN;
private double cuTop = double.NaN;
private double cuBottom = double.NaN;
private bool usePop = true;
private double strengthIncreaseExponent = double.NaN;
private SoilType soilType;
///
/// Initializes a new instance of the class.
///
public Soil()
{
Name = LocalizationManager.GetTranslatedText(this, "DefaultNameSoilMaterial");
soilType = SoilType.Sand;
}
///
/// Initializes a new instance of the class.
///
/// The name.
/// Unit weight below phreatic level
/// Unit weight above phreatic level
public Soil(string name, double belowPhreaticLevel, double abovePhreaticLevel) : this()
{
Name = name;
AbovePhreaticLevel = abovePhreaticLevel;
BelowPhreaticLevel = belowPhreaticLevel;
}
///
/// Initializes a new instance of the class.
///
/// The name.
public Soil(string name) : this()
{
Name = name;
}
///
/// Gets or sets the type of the soil.
///
///
/// The type of the soil.
///
public virtual SoilType SoilType
{
get
{
return soilType;
}
set
{
if (!soilType.Equals(value))
{
soilType = value;
}
}
}
#region property Name
///
/// Gets or sets the name of the soil.
///
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
///
/// Returns a that represents this instance.
///
///
/// A that represents this instance.
///
public override string ToString()
{
return Name;
}
#endregion property Name
#region property BelowPhreaticLevel
///
/// Unit Weight below the phreatic level (kN/m3)
///
public double BelowPhreaticLevel
{
set
{
belowPhreaticLevel = value;
}
get
{
return belowPhreaticLevel;
}
}
#endregion
#region property AbovePhreaticLevel
///
/// Unit Weight above the phreatic level (kN/m3)
///
public double AbovePhreaticLevel
{
set
{
abovePhreaticLevel = value;
}
get
{
return abovePhreaticLevel;
}
}
#endregion
#region property DryUnitWeight
///
/// Ovendry unit weight [kN/m3]
///
public double DryUnitWeight
{
get
{
return dryUnitWeight;
}
set
{
if (!dryUnitWeight.Equals(value))
{
dryUnitWeight = value;
}
}
}
#endregion property DryUnitWeight
#region property Cohesion
///
/// Cohesion (the force that holds together molecules or like particles within a soil) [kN/m2]
///
public double Cohesion
{
get
{
return cohesion;
}
set
{
cohesion = value;
}
}
#endregion
#region property FrictionAngle
///
/// Critical state friction angle (deg)
///
public double FrictionAngle //gedaan
{
get
{
return frictionAngle;
}
set
{
frictionAngle = value;
}
}
#endregion property FrictionAngle
#region property POP
///
/// Pre-overburden pressure (POP)
/// Equal to pre-consolidation stress minus effective stress
///
public double PoP
{
get
{
return poP;
}
set
{
poP = value;
}
}
#endregion property POP
#region property OCR
///
/// Over-consolidation ratio (OCR)
///
public double Ocr
{
get
{
return ocr;
}
set
{
ocr = value;
}
}
#endregion property OCR
#region property RatioCuPc
///
/// Ratio Cu/Pc
///
public double RatioCuPc
{
get
{
return ratioCuPc;
}
set
{
ratioCuPc = value;
}
}
#endregion property RatioCuPc
#region property CuTop
///
/// Cu Top
///
public double CuTop
{
get
{
return cuTop;
}
set
{
cuTop = value;
}
}
#endregion property CuTop
#region property CuBottom
///
/// Cu Bottom
///
public double CuBottom
{
get
{
return cuBottom;
}
set
{
cuBottom = value;
}
}
#endregion property CuBottom
#region property UsePop
///
/// Use POP for shear strength model
///
public bool UsePop
{
get
{
return usePop;
}
set
{
usePop = value;
}
}
#endregion property UsePop
#region property DilatancyType
///
/// Dilatancy (shear thickening) type
///
public DilatancyType DilatancyType
{
get
{
return dilatancyType;
}
set
{
if (!dilatancyType.Equals(value))
{
dilatancyType = value;
}
}
}
#endregion property DilatancyType
#region property StrengthIncreaseExponent
///
/// Gets or sets the strength increase exponent.
///
///
/// The strength increase exponent.
///
public double StrengthIncreaseExponent
{
get
{
return strengthIncreaseExponent;
}
set
{
strengthIncreaseExponent = value;
}
}
#endregion property StrengthIncreaseExponent
#region property ShearStrengthModel
///
/// Shear strength model to use
///
public ShearStrengthModel ShearStrengthModel
{
get
{
return shearStrengthModel;
}
set
{
shearStrengthModel = value;
}
}
#endregion property ShearStrengthModel
///
/// Assigns the specified a soil.
///
/// a soil.
public void Assign(Soil aSoil)
{
name = aSoil.Name;
dilatancyType = aSoil.DilatancyType;
shearStrengthModel = aSoil.ShearStrengthModel;
belowPhreaticLevel = aSoil.BelowPhreaticLevel;
abovePhreaticLevel = aSoil.AbovePhreaticLevel;
cohesion = aSoil.Cohesion;
frictionAngle = aSoil.FrictionAngle;
poP = aSoil.PoP;
ocr = aSoil.Ocr;
ratioCuPc = aSoil.RatioCuPc;
cuTop = aSoil.CuTop;
cuBottom = aSoil.CuBottom;
usePop = aSoil.UsePop;
strengthIncreaseExponent = aSoil.StrengthIncreaseExponent;
}
}
}