示例#1
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="Convection"></param>
        /// <param name="HeatConduction"></param>
        public MatrixAssemblyTemperature(SIMPLEOperator Convection, SIMPLEOperator HeatConduction)
            : base(false, false, MaxUsePerIterMatrix: 2)
        {
            this.Convection     = Convection;
            this.HeatConduction = HeatConduction;

            base.Initialize();
        }
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="Convection">
        /// Convection operator for momentum equation.
        /// </param>
        /// <param name="Visc">
        /// Viscous (Laplace) operator  for momentum equation.
        /// </param>
        /// <param name="MaxUsePerIterMatrix"></param>
        /// <param name="MaxUsePerIterAffine"></param>
        public MatrixAssemblyIncompressiblePredictor(SIMPLEOperator Convection, SIMPLEOperator Visc, int MaxUsePerIterMatrix, int MaxUsePerIterAffine)
            : base(false, Convection.OnlyAffine, MaxUsePerIterMatrix, MaxUsePerIterAffine)
        {
            m_Convection = Convection;
            m_Visc       = Visc;

            base.Initialize();
        }
示例#3
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="IPOperator"></param>
        /// <param name="PressureStabilization"></param>
        /// <param name="SolverConf"></param>
        /// <param name="BDF"></param>
        public MatrixAssemblyCorrectorIP1(SIMPLEOperator IPOperator, SIMPLEOperator PressureStabilization, SolverConfiguration SolverConf, BDFScheme BDF)
            : base((SolverConf.Control.Algorithm == SolutionAlgorithms.Steady_SIMPLE), false)
        {
            m_IPOperator = IPOperator;

            m_PressureStabilization = PressureStabilization;
            m_SolverConf            = SolverConf;
            m_BDF = BDF;

            base.Initialize();
        }
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="DivergenceConti"></param>
        /// <param name="PredictorApproxInv"></param>
        /// <param name="PressureGradient"></param>
        /// <param name="UpdateCycleAppPred"></param>
        /// <param name="PressureStabilization">
        /// Can be null,
        /// i.e. no pressure stabilization is used.
        /// </param>
        public MatrixAssemblyIncompressibleCorrector(SIMPLEOperator[] DivergenceConti, SIMPLEMatrixAssembly PredictorApproxInv, SIMPLEOperator[] PressureGradient,
                                                     int UpdateCycleAppPred, SIMPLEOperator PressureStabilization)
            : base(PredictorApproxInv.IsConstant, false)
        {
            if (DivergenceConti.Length != PressureGradient.Length)
            {
                throw new ArgumentException("Mismatch in dimensions");
            }

            m_DivergenceConti    = DivergenceConti;
            m_PredictorApproxInv = PredictorApproxInv;
            m_PressureGradient   = PressureGradient;

            m_PressureStabilization = PressureStabilization;

            base.Initialize();
        }
示例#5
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="Swip2"></param>
        /// <param name="Swip3">Can be null for multiphase flows.</param>
        /// <param name="Component">Component of velocity vector.</param>
        /// <param name="VelocityMapping"></param>
        /// <param name="VelocityVectorMapping"></param>
        public MatrixAssemblyViscSplit(SIMPLEOperator Swip2, SIMPLEOperator Swip3, int Component,
                                       UnsetteledCoordinateMapping VelocityMapping, UnsetteledCoordinateMapping VelocityVectorMapping)
            : base(false, false)
        {
            this.Swip2 = Swip2;
            this.Swip3 = Swip3;

            RowIndicesSource = new int[Swip2.LocalLength];
            int i0 = Swip2.RowPartition.i0;

            for (int i = 0; i < Swip2.LocalLength; i++)
            {
                RowIndicesSource[i] = i + i0;
            }

            ColumnIndicesSource = VelocityVectorMapping.GetSubvectorIndices(true, Component);
            ColumnIndicesTarget = VelocityMapping.GetSubvectorIndices(true, 0);

            base.Initialize();
        }
示例#6
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="solverConf"></param>
        /// <param name="sparseSolver"></param>
        /// <param name="MatAsmblyCorrector"></param>
        /// <param name="VelocityDivergence"></param>
        /// <param name="BDF"></param>
        /// <param name="Velocity_Intrmed"></param>
        /// <param name="DivB4"></param>
        /// <param name="PressureStabilization">Can be null</param>
        /// <param name="Pressure"></param>
        public SolverCorrector(SolverConfiguration solverConf, ISparseSolver sparseSolver,
                               SIMPLEMatrixAssembly MatAsmblyCorrector, SIMPLEOperator[] VelocityDivergence, BDFScheme BDF,
                               VectorField <SinglePhaseField> Velocity_Intrmed, SinglePhaseField DivB4,
                               SIMPLEOperator PressureStabilization, SinglePhaseField Pressure)
            : base(solverConf, sparseSolver)
        {
            if ((VelocityDivergence.Length != solverConf.SpatialDimension) || (Velocity_Intrmed.Dim != solverConf.SpatialDimension))
            {
                throw new ArgumentException("Mismatch of dimensions!");
            }

            m_SolverConf = solverConf;

            m_MatAsmblyCorrector = MatAsmblyCorrector;
            m_VelocityDivergence = VelocityDivergence;

            m_BDF = BDF;

            m_Velocity_Intrmed = Velocity_Intrmed;
            m_DivB4            = DivB4;

            m_PressureStabilization = PressureStabilization;
            m_Pressure = Pressure;
        }
示例#7
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="Convection">
        /// Convection operator for scalar.
        /// </param>
        public MatrixAssemblyLevelSet(SIMPLEOperator Convection) : base(false, false, MaxUsePerIterMatrix: 2)
        {
            m_Convection = Convection;

            base.Initialize();
        }