Skip to content
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

MAT1 Young's modulus accept integer type #747

Open
jaredmagnusson opened this issue Sep 25, 2023 · 2 comments
Open

MAT1 Young's modulus accept integer type #747

jaredmagnusson opened this issue Sep 25, 2023 · 2 comments

Comments

@jaredmagnusson
Copy link

Our FEA meshing tool outputs a default material MAT1 for stainless steel with a Young's Modulus E=206800 when generating a BDF file. This always triggers an error when pyNastran reads in the file:

E = '206800' (field #2) on card must be a float or blank (not an integer).
card=['MAT1*', '100', '206800', '80155.039', '0.29', '7e-06', '1.2e-05']
SyntaxError: E = '206800' (field #2) on card must be a float (not an integer).

Given that Young's moduli are usually large values and often aren't known to decimal precision (when not written with exponential format), could pyNastran simply convert the int to a float here? When adding the material card, rather than calling double_or_blank, it could call integer_double_or_blank?

@SteveDoyle2
Copy link
Owner

SteveDoyle2 commented Sep 25, 2023 via email

@jaredmagnusson
Copy link
Author

jaredmagnusson commented Sep 26, 2023

Ok. Currently all Cubit Nastran exports include a default MAT1 card with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants