Esempio n. 1
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="SolverConf"></param>
        /// <param name="WorkingSet"></param>
        /// <param name="WorkingSetMatrices"></param>
        public SIMPLEStepLowMach(SolverConfiguration SolverConf, VariableSet WorkingSet, VariableMatrices WorkingSetMatrices)
            : base(SolverConf, WorkingSet, WorkingSetMatrices)
        {
            this.LowMachControl = SolverConf.Control as LowMachSIMPLEControl;
            if (this.LowMachControl == null)
            {
                throw new ArgumentException("Invalid config", nameof(SolverConf));
            }

            // Construct SIMPLEOperators
            UnsetteledCoordinateMapping TemperatureMapping = new UnsetteledCoordinateMapping(WorkingSet.TemperatureBasis);
            UnsetteledCoordinateMapping PressureMapping    = new UnsetteledCoordinateMapping(WorkingSet.PressureBasis);

            OperatorsTemperature = new OperatorFactoryTemperature(
                TemperatureMapping,
                PressureMapping,
                base.WorkingSet.Velocity.Current,
                base.WorkingSet.VelocityMean,
                base.WorkingSet.Temperature.Current,
                base.WorkingSet.TemperatureMean,
                SolverConf);

            // Construct matrix assemblies
            MatrixAssembliesTemperature = new MatrixFactoryTemperature(
                OperatorsTemperature, TemperatureMapping.GridDat.iLogicalCells.NoOfLocalUpdatedCells, WorkingSetMatrices.Rho.Matrix, SolverConf, base.BDF);
        }
Esempio n. 2
0
        /// <summary>
        /// Ctor.
        /// </summary>
        public MatrixFactoryTemperature(OperatorFactoryTemperature TemperatureOperators, int LocalNoOfCells, BlockDiagonalMatrix Rho,
                                        SolverConfiguration solverConf, BDFScheme BDF)
        {
            Temperature = new MatrixAssemblyTemperature(TemperatureOperators.TemperatureConvection, TemperatureOperators.HeatConduction);

            LowMachSIMPLEControl lowMachControl = solverConf.Control as LowMachSIMPLEControl;

            if (lowMachControl.RelaxationModeTemperature == RelaxationTypes.Implicit)
            {
                TemperatureApprox = new MatrixAssemblyApprox(
                    solverConf, LocalNoOfCells, Temperature, BDF, Rho, 2 * lowMachControl.PredictorApproximationUpdateCycle);
            }
        }