Ejemplo n.º 1
0
        protected override MsrMatrix DefineMatrix(double dt)
        {
            MsrMatrix res = new MsrMatrix(m_MatAsmblyLevelSet.AssemblyMatrix);

            if ((m_ModeRelaxLevelSet == RelaxationTypes.Implicit) && (m_RelaxFactor != 0.0))
            {
                res.Acc(m_RelaxFactor, m_MatAsmblyLevelSetApprox.AssemblyMatrix);
            }

            if (m_BDF != null)
            {
                double LhsSummand = m_BDF.GetLhsSummand(dt, m_solverConf.BDFOrder);
                res.AccEyeSp(LhsSummand);
            }

            return(res);
        }
Ejemplo n.º 2
0
        protected override MsrMatrix DefineMatrix(double dt)
        {
            MsrMatrix res = new MsrMatrix(MatAsmblyTemperature.AssemblyMatrix);

            if ((ModeRelaxTemperature == RelaxationTypes.Implicit) && (RelaxFactor != 0.0))
            {
                res.Acc(RelaxFactor, MatAsmblyTemperatureApprox.AssemblyMatrix);
            }

            if (BDF != null)
            {
                double LhsSummand = BDF.GetLhsSummand(dt, base.m_solverConf.BDFOrder);
                res.Acc(LhsSummand / gamma, DensityMatrix);
            }

            return(res);
        }
Ejemplo n.º 3
0
        protected override MsrMatrix DefineMatrix(double dt)
        {
            MsrMatrix res = new MsrMatrix(m_MatAsmblyPredictor.AssemblyMatrix);

            if (m_RelaxFactor != 0.0)
            {
                res.Acc(m_RelaxFactor, m_MatAsmblyPredictorApprox.AssemblyMatrix);
            }

            if (m_BDF != null)
            {
                double LhsSummand = m_BDF.GetLhsSummand(dt, base.m_solverConf.BDFOrder);
                res.Acc(LhsSummand, m_DensityMatrix);
            }

            return(res);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        protected override MsrMatrix DefineMatrix(double dt)
        {
            MsrMatrix res = new MsrMatrix(m_MatAsmblyPredictor[0].AssemblyMatrix);

            //See left-hand side of Eq. (18) in
            //B. Klein, F. Kummer, M. Keil, and M. Oberlack,
            //An extension of the SIMPLE based discontinuous Galerkin solver to unsteady incompressible flows, J. Comput. Phys., 2013.
            if (m_RelaxFactor != 0.0)
            {
                res.Acc(m_RelaxFactor, m_MatAsmblyPredictorApprox.AssemblyMatrix);
            }

            if (m_BDF != null)
            {
                double LhsSummand = m_BDF.GetLhsSummand(dt, base.m_solverConf.BDFOrder);
                res.AccEyeSp(LhsSummand);
            }

            return(res);
        }