예제 #1
0
        // Use this for initialization
        public override void Start()
        {
            out_step = 2000 * step;

            base.Start();

            if (init_sys)
            {
                m_use_mat_props  = true;
                m_contact_model  = contactForceModel;
                m_adhesion_model = adhesionForceModel;
                m_tdispl_model   = tangentialDisplacementModel;
                m_stiff_contact  = false;

                descriptor = new ChSystemDescriptor();
                descriptor.SetNumThreads(parallel_thread_number);

                solver_speed = new ChSolverSMC();
                solver_stab  = new ChSolverSMC();

                collision_system = new collision.ChCollisionSystemBullet((uint)max_objects, scene_size);

                // For default SMC there is no need to create contacts 'in advance'
                // when models are closer than the safety envelope, so set default envelope to 0
                collision.ChCollisionModel.SetDefaultSuggestedEnvelope(0);

                contact_container = gameObject.AddComponent <ChContactContainerSMC>();
                contact_container.SetSystem(this);

                m_minSlipVelocity        = 1e-4;
                m_characteristicVelocity = 1;
            }
        }
예제 #2
0
        public override void Start()
        {
            base.Start();

            if (init_sys)
            {
                SetSolverWarmStarting(true);
                // Set default contact container
                contact_container = gameObject.AddComponent <ChContactContainerNSC>() as ChContactContainerNSC;//new ChContactContainerNSC();
                contact_container.SetSystem(this);

                // Set default collision engine
                collision_system = new collision.ChCollisionSystemBullet((uint)max_objects, scene_size);

                // Set the system descriptor
                descriptor = new ChSystemDescriptor();
                descriptor.SetNumThreads(parallel_thread_number);

                // Set default solver
                SetSolverType(solverType);

                // Set default collision envelope and margin.
                collision.ChCollisionModel.SetDefaultSuggestedEnvelope(0.03);
                // collision.ChCollisionModel.SetDefaultSuggestedMargin(0.01);
            }
        }