// Copyright (C) Stichting Deltares 2017. All rights reserved.
//
// This file is part of Ringtoets.
//
// Ringtoets is free software: you can redistribute it and/or modify
// it under the terms of the GNU 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 General Public License for more details.
//
// You should have received a copy of the GNU 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 Ringtoets.Common.Data.Probabilistics;
namespace Ringtoets.Piping.Data
{
///
/// Factory for creating design variables based on probabilistic distributions for piping.
///
public static class PipingSemiProbabilisticDesignVariableFactory
{
#region General parameters
///
/// Creates the design variable for .
///
public static DesignVariable GetSaturatedVolumicWeightOfCoverageLayer(PipingInput parameters)
{
var derivedPipingInput = new DerivedPipingInput(parameters);
if (double.IsNaN(derivedPipingInput.ThicknessCoverageLayer.Mean))
{
return new DeterministicDesignVariable(derivedPipingInput.SaturatedVolumicWeightOfCoverageLayer);
}
return new LogNormalDistributionDesignVariable(derivedPipingInput.SaturatedVolumicWeightOfCoverageLayer)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for .
///
public static DesignVariable GetThicknessCoverageLayer(PipingInput parameters)
{
var derivedPipingInput = new DerivedPipingInput(parameters);
if (double.IsNaN(derivedPipingInput.ThicknessCoverageLayer.Mean))
{
return new DeterministicDesignVariable(derivedPipingInput.ThicknessCoverageLayer);
}
return new LogNormalDistributionDesignVariable(derivedPipingInput.ThicknessCoverageLayer)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for .
///
public static DesignVariable GetEffectiveThicknessCoverageLayer(PipingInput parameters)
{
var derivedPipingInput = new DerivedPipingInput(parameters);
if (double.IsNaN(derivedPipingInput.ThicknessCoverageLayer.Mean))
{
return new DeterministicDesignVariable(derivedPipingInput.EffectiveThicknessCoverageLayer);
}
return new LogNormalDistributionDesignVariable(derivedPipingInput.EffectiveThicknessCoverageLayer)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for .
///
public static DesignVariable GetPhreaticLevelExit(PipingInput parameters)
{
return new NormalDistributionDesignVariable(parameters.PhreaticLevelExit)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for .
///
public static DesignVariable GetDampingFactorExit(PipingInput parameters)
{
return new LogNormalDistributionDesignVariable(parameters.DampingFactorExit)
{
Percentile = 0.95
};
}
#endregion
#region Piping parameters
///
/// Creates the design variable for .
///
public static VariationCoefficientDesignVariable GetSeepageLength(PipingInput parameters)
{
var derivedPipingInput = new DerivedPipingInput(parameters);
return new VariationCoefficientLogNormalDistributionDesignVariable(derivedPipingInput.SeepageLength)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for .
///
public static VariationCoefficientDesignVariable GetDiameter70(PipingInput parameters)
{
var derivedPipingInput = new DerivedPipingInput(parameters);
return new VariationCoefficientLogNormalDistributionDesignVariable(derivedPipingInput.DiameterD70)
{
Percentile = 0.05
};
}
///
/// Creates the design variable for .
///
public static VariationCoefficientDesignVariable GetDarcyPermeability(PipingInput parameters)
{
var derivedPipingInput = new DerivedPipingInput(parameters);
return new VariationCoefficientLogNormalDistributionDesignVariable(derivedPipingInput.DarcyPermeability)
{
Percentile = 0.95
};
}
///
/// Creates the design variable for .
///
public static DesignVariable GetThicknessAquiferLayer(PipingInput parameters)
{
var derivedPipingInput = new DerivedPipingInput(parameters);
return new LogNormalDistributionDesignVariable(derivedPipingInput.ThicknessAquiferLayer)
{
Percentile = 0.95
};
}
#endregion
}
}