-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding push capability for orthotropic materials #372
Changes from 3 commits
65f6581
668244f
ff12321
959fa0d
5002f3a
e770a2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ | |
* along with this code. If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>. | ||
*/ | ||
|
||
|
||
using System; | ||
using BH.oM.Physical.Materials; | ||
using BH.oM.Structure.MaterialFragments; | ||
using BH.Engine.Structure; | ||
|
@@ -48,10 +50,36 @@ public static void ToRobot(IRobotMaterialData materialData, IMaterialFragment ma | |
materialData.Kirchoff = isotropic.ShearModulus(); | ||
materialData.DumpCoef = isotropic.DampingRatio; | ||
} | ||
else if (material is Timber) | ||
{ | ||
Timber timber = material as Timber; | ||
materialData.E = timber.YoungsModulus.X; | ||
Engine.Reflection.Compute.RecordWarning("Young's modulus in Y and Z axis are ignored due to Robot definition limitation"); | ||
materialData.E_Trans = Math.Abs((timber.YoungsModulus.Y+timber.YoungsModulus.Z)/2); | ||
Engine.Reflection.Compute.RecordWarning("Young transverse modulue (timber) is an average between Y and Z axis due to Robot definition limitation"); | ||
materialData.RO = timber.Density * Engine.Robot.Query.RobotGravityConstant; | ||
materialData.Kirchoff = timber.ShearModulus.X;//Since shear modulus is expressed as shear stress over shear strain, longitudinal value is used as it is likely used for cross section analysis. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would change this to the average value of the vector in BHoM |
||
Engine.Reflection.Compute.RecordWarning("Shear modulus in Y and Z axis are ignored due to Robot definition limitation"); | ||
materialData.LX = timber.ThermalExpansionCoeff.X;//Value in X axis. Longitudinal expansion for bar element is likely of interets. | ||
Engine.Reflection.Compute.RecordWarning("Thermal Expansion Coefficient in Y and Z axis are ignored due to Robot definition limitation"); | ||
materialData.NU = timber.PoissonsRatio.X;//Poisson ratio in X axis. Longitudinal defomation under axial loading is likely of interests. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can actually not be set through the UI in robot, so would completely skip setting this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've deleted the PoissonsRatio for Timber material because as you mentioned it is not a component for Robot Timber material. I think thermalExpansionCoeff is steel worth keeping thought? |
||
Engine.Reflection.Compute.RecordWarning("Poisson ratio in Y and Z axis are ignored due to Robot definition limitation"); | ||
materialData.DumpCoef = timber.DampingRatio; | ||
|
||
} | ||
else | ||
{ | ||
Engine.Reflection.Compute.RecordWarning("Robot_Toolkit does currently only suport Isotropic material. No structural properties for material with name " + material.Name + " have been pushed"); | ||
return; | ||
IOrthotropic orthotropic = material as IOrthotropic; | ||
materialData.E = orthotropic.YoungsModulus.X; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missed copying in this warning as well:
|
||
Engine.Reflection.Compute.RecordWarning("Young's modulus in Y and Z axis are ignored due to Robot definition limitation"); | ||
materialData.NU = orthotropic.PoissonsRatio.X;//Poisson ratio in X axis. Longitudinal defomation under axial loading is likely of interests. | ||
Engine.Reflection.Compute.RecordWarning("Poisson ratio in Y and Z axis are ignored due to Robot definition limitation"); | ||
materialData.RO = orthotropic.Density * Engine.Robot.Query.RobotGravityConstant; | ||
materialData.LX = orthotropic.ThermalExpansionCoeff.X;//Value in X axis. Longitudinal expansion for bar element is likely of interets. | ||
Engine.Reflection.Compute.RecordWarning("Thermal Expansion Coefficient in Y and Z axis are ignored due to Robot definition limitation"); | ||
materialData.Kirchoff = orthotropic.ShearModulus.X;//Since shear modulus is expressed as shear stress over shear strain, longitudinal value is used as it is likely used for cross section analysis. | ||
materialData.DumpCoef = orthotropic.DampingRatio; | ||
materialData.Type = IRobotMaterialType.I_MT_OTHER; | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested single warning message, replacing the warnings below.: