Example #1
0
        /// <summary>
        /// Update Forces and Torque acting from fluid onto the particle
        /// </summary>
        /// <param name="U"></param>
        /// <param name="P"></param>
        /// <param name="levelSetTracker"></param>
        /// <param name="fluidViscosity"></param>
        /// <param name="cutCells"></param>
        /// <param name="dt"></param>
        public virtual double CalculateHydrodynamicTorque(ParticleHydrodynamicsIntegration hydrodynamicsIntegration, CellMask cutCells, double dt = 0)
        {
            double tempTorque = hydrodynamicsIntegration.Torque(Position[0], cutCells);

            Aux.TestArithmeticException(tempTorque, "temporal torque during calculation of hydrodynamics");
            TorqueMPISum(ref tempTorque);
            return(tempTorque);
        }
Example #2
0
        /// <summary>
        /// Update Forces and Torque acting from fluid onto the particle
        /// </summary>
        /// <param name="U"></param>
        /// <param name="P"></param>
        /// <param name="levelSetTracker"></param>
        /// <param name="fluidViscosity"></param>
        /// <param name="cutCells"></param>
        /// <param name="dt"></param>
        public override double CalculateHydrodynamicTorque(ParticleHydrodynamicsIntegration hydrodynamicsIntegration, CellMask cutCells, double dt)
        {
            double tempTorque = hydrodynamicsIntegration.Torque(GetPosition(0), cutCells);

            Aux.TestArithmeticException(tempTorque, "temporal torque during calculation of hydrodynamics");
            TorqueMPISum(ref tempTorque);
            TorqueAddedDamping(ref tempTorque, dt);
            return(tempTorque);
        }