Exemplo n.º 1
0
 /// <summary>
 /// ctor; parameter documentation see <see cref="swipViscosityBase.swipViscosityBase"/>.
 /// </summary>
 public swipViscosity_Term2(double _penalty, int iComp, int D, IncompressibleBoundaryCondMap bcmap,
                            ViscosityOption _ViscosityMode, ViscositySolverMode ViscSolverMode = ViscositySolverMode.FullyCoupled,
                            double constantViscosityValue = double.NaN, double reynolds = double.NaN, MaterialLaw EoS = null)
     : base(_penalty, iComp, D, bcmap, _ViscosityMode, constantViscosityValue, reynolds, EoS)
 {
     this.ViscSolverMode = ViscSolverMode;
 }
Exemplo n.º 2
0
 /// <summary>
 /// ctor; parameter documentation see <see cref="swipViscosityBase.swipViscosityBase"/>.
 /// </summary>
 public swipViscosity_Term3(double _penalty, MultidimensionalArray PenaltyLengthScales, int iComp, int D, IncompressibleBoundaryCondMap bcmap,
                            ViscosityImplementation implMode, ViscosityOption _ViscosityMode, ViscositySolverMode ViscSolverMode = ViscositySolverMode.FullyCoupled,
                            double constantViscosityValue = double.NaN, double reynolds = double.NaN, MaterialLaw EoS = null)
     : base(_penalty, PenaltyLengthScales, iComp, D, bcmap, implMode, _ViscosityMode, constantViscosityValue, reynolds, EoS)
 {
     this.ViscSolverMode = ViscSolverMode;
 }
Exemplo n.º 3
0
        /// <summary>
        /// ctor.
        /// </summary>
        /// <param name="_penaltyBase"></param>
        /// <param name="iComp">
        /// component index
        /// </param>
        /// <param name="D">
        /// spatial dimension.
        /// </param>
        /// <param name="bcmap"></param>
        /// <param name="_ViscosityMode">
        /// see <see cref="ViscosityOption"/>
        /// </param>
        /// <param name="constantViscosityValue">
        /// Constant value for viscosity.
        /// Needs to be given for <see cref="ViscosityOption.ConstantViscosity"/>.
        /// </param>
        /// <param name="reynolds">
        /// Reynolds number for dimensionless formulation.
        /// Needs to be given for <see cref="ViscosityOption.ConstantViscosityDimensionless"/> and <see cref="ViscosityOption.VariableViscosityDimensionless"/>.
        /// </param>
        /// <param name="EoS">
        /// Optional material law for calculating the viscosity
        /// as a function of the level-set.
        /// Only available for <see cref="ViscosityOption.VariableViscosity"/> and <see cref="ViscosityOption.VariableViscosityDimensionless"/>.
        /// </param>
        protected swipViscosityBase(
            double _penaltyBase,
            int iComp, int D, IncompressibleBoundaryCondMap bcmap,
            ViscosityOption _ViscosityMode, double constantViscosityValue = double.NaN, double reynolds = double.NaN, MaterialLaw EoS = null)
        {
            //Func<double, int, int, MultidimensionalArray, double> ComputePenalty = null) {
            this.m_penalty_base = _penaltyBase;
            //this.m_ComputePenalty = ComputePenalty;
            this.m_iComp = iComp;
            this.m_D     = D;
            //this.cj = PenaltyLengthScales;
            velFunction        = D.ForLoop(d => bcmap.bndFunction[VariableNames.Velocity_d(d)]);
            EdgeTag2Type       = bcmap.EdgeTag2Type;
            this.m_PhysicsMode = bcmap.PhysMode;

            this.m_ViscosityMode = _ViscosityMode;
            switch (_ViscosityMode)
            {
            case ViscosityOption.ConstantViscosity:
                if (double.IsNaN(constantViscosityValue))
                {
                    throw new ArgumentException("constantViscosityValue is missing!");
                }
                this.m_constantViscosityValue = constantViscosityValue;
                break;

            case ViscosityOption.ConstantViscosityDimensionless:
                if (double.IsNaN(reynolds))
                {
                    throw new ArgumentException("reynolds number is missing!");
                }
                this.m_reynolds = reynolds;
                break;

            case ViscosityOption.VariableViscosity:
                this.m_EoS = EoS;
                break;

            case ViscosityOption.VariableViscosityDimensionless:
                if (double.IsNaN(reynolds))
                {
                    throw new ArgumentException("reynolds number is missing!");
                }
                this.m_reynolds = reynolds;
                this.m_EoS      = EoS;
                break;

            default:
                throw new NotImplementedException();
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// ctor; parameter documentation see <see cref="swipViscosityBase.swipViscosityBase"/>.
 /// </summary>
 public swipViscosity_Term1(double _penalty, int iComp, int D, IncompressibleBoundaryCondMap bcmap,
                            ViscosityOption _ViscosityMode, double constantViscosityValue = double.NaN, double reynolds = double.NaN, MaterialLaw EoS = null)
 //Func<double, int, int, MultidimensionalArray, double> ComputePenalty = null)
     : base(_penalty, iComp, D, bcmap, _ViscosityMode, constantViscosityValue, reynolds, EoS)
 {
 }
 /// <summary>
 /// ctor; parameter documentation see <see cref="swipViscosityBase.swipViscosityBase"/>.
 /// </summary>
 public swipViscosity_Term1_variante(double _penalty, int iComp, int D, IncompressibleBoundaryCondMap bcmap,
                                     ViscosityOption _ViscosityMode, double constantViscosityValue = double.NaN, double reynolds = double.NaN, MaterialLaw EoS = null)
     : base(_penalty, iComp, D, bcmap, _ViscosityMode, constantViscosityValue, reynolds, EoS)
 {
 }
 /// <summary>
 /// ctor; parameter documentation see <see cref="swipViscosityBase.swipViscosityBase"/>.
 /// </summary>
 public swipViscosity_Term1_variante(double _penalty, MultidimensionalArray PenaltyLengthScales, int iComp, int D, IncompressibleBoundaryCondMap bcmap, ViscosityImplementation implMode,
                                     ViscosityOption _ViscosityMode, double constantViscosityValue         = double.NaN, double reynolds = double.NaN, MaterialLaw EoS = null,
                                     Func <double, int, int, MultidimensionalArray, double> ComputePenalty = null)
     : base(_penalty, PenaltyLengthScales, iComp, D, bcmap, implMode, _ViscosityMode, constantViscosityValue, reynolds, EoS, ComputePenalty)
 {
 }