Problems with automatic unit conversion from PyACP to PyMechanical #1589
Unanswered
Raphael0326
asked this question in
Q&A
Replies: 1 comment
-
|
@greschd Do you know a possible solution for this ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I got a Problem that the dimensions of my PyAcp Model (cbd,h5) that is definied in mm gets coverted into m.
I create my ACP model with another cbd file created from an dat file:
acp_model = acp.import_model(path=cdb_dir, format="ansys:cdb",unit_system = "MPa",)
than I define my composite model and use pyacp to export my composite solid model and import it in mechanical as follow:
'# import mesh, materials and plies into mechanical
'# import mesh
pyacp.mechanical_integration_helpers.import_acp_mesh_from_cdb(
mechanical=mech,
cdb_path=analysis_solidmodel_path,
check_valid_blocked_cdb_file=False
)
'# import materials
mech.run_python_script(
f"Model.Materials.Import({str(matfile)!r})")
'# import ply
pyacp.mechanical_integration_helpers.import_acp_composite_definitions(
mechanical=mech,
path=h5_solid_filename
)
After that I run a pymechanical session with mech.run_python_script.
There the unit system of written ds.dat file is defined as MPa but all values increase.
If I define my mechanical units system with:
mech.run_python_script("ExtAPI.Application.ActiveUnitSystem = MechanicalUnitSystem.StandardMKS")
the value stay the same but the units change to [m,kg,s] as expected.
Does anyone know a solution how to let mechanical use the unit system of the composite definition file (.h5) without scaling the values? Or has a workaround?
Beta Was this translation helpful? Give feedback.
All reactions