コード例 #1
0
        /// <summary>
        /// Sets the material directional symmetry type, and assigns the corresponding mechanical properties.
        /// </summary>
        /// <param name="properties">The properties.</param>
        public void Set(MechanicalOrthotropicProperties properties)
        {
            _apiMaterialProperties.SetMechanicalPropertiesOrthotropic(Name,
                                                                      properties.ModulusOfElasticity.ToList().ToArray(),
                                                                      properties.PoissonsRatio.ToList().ToArray(),
                                                                      properties.ThermalCoefficient.ToList().ToArray(),
                                                                      properties.ShearModulus.ToList().ToArray(),
                                                                      Temperature);

            _orthotropicProperties = properties;
        }
コード例 #2
0
        /// <summary>
        /// Retrieves the mechanical properties for a material with the corresponding directional symmetry type.
        /// </summary>
        public void Fill()
        {
            _apiMaterialProperties.GetMechanicalPropertiesOrthotropic(Name,
                                                                      out var modulusOfElasticities,
                                                                      out var poissonsRatios,
                                                                      out var thermalCoefficients,
                                                                      out var shearModuluses,
                                                                      Temperature);

            _orthotropicProperties = new MechanicalOrthotropicProperties
            {
                ModulusOfElasticity =
                {
                    E1 = modulusOfElasticities[0],
                    E2 = modulusOfElasticities[1],
                    E3 = modulusOfElasticities[2]
                },

                PoissonsRatio =
                {
                    U12 = poissonsRatios[0],
                    U13 = poissonsRatios[1],
                    U23 = poissonsRatios[2]
                },

                ThermalCoefficient =
                {
                    A1 = thermalCoefficients[0],
                    A2 = thermalCoefficients[1],
                    A3 = thermalCoefficients[2]
                },

                ShearModulus =
                {
                    G12 = shearModuluses[0],
                    G13 = shearModuluses[1],
                    G23 = shearModuluses[2]
                }
            };
        }