-
Notifications
You must be signed in to change notification settings - Fork 16
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
Export model files in MPa unit system #792
Comments
Hi @e-dub . The Kratos problemtype defines the unit system that it's going to be written in it's spd / xml files, and allows the user to use another unit system in the interface. The default units are defined in the condition: The gui shows the default unit And that is what we get printed in the Project parameters.json file If the user changes the units in the GUI: It is converted automatically to respect the unit system the application needs. in this case, the default unit was N/m and the user changed to N/mm, so the writing process convert the 70 N/mm the user selected to 70000 N/m the application expects. You can change the units of the mesh (mdpa) in the Units section of the tree. And by changing it to mm: I don't know if this solves your questions. The only I can add to this is that you are not alone in this issue (see #394) . |
Many thanks @jginternational for the fast and detailed answer! Summarized, I want to avoid the automatic translation to SI and keep the Kratos model in MPa units, i.e. nodes in mm. If I understood this correctly, I would have to change all the XML files, e.g. in .../GiDInterface/kratos.gid/apps/Structural/xml/, to implement such a change. Is there an easier way to avoid the automatic translation to SI in GiD? |
Take into account that a kratos model is "unitless". It just need to be coherent. In the user interface, we have them to help, but the input files are unitless. I don't really understand what do you need. You can check this branch, and play with the bottom section of the tree -> Write units |
Wow that was quick! Respect! For not understanding, you got it quite good 😉 ! I tested the branch with a simple structural model and the mesh "stays" in mm. The material model is though written in SI. I saw your changes and tried to do the same for the material, but I am not smart enough 😉...yet |
I got a chance to look at this again today. The MDPA "keeps" mm only if I change the mesh to m. E.g.: I set the mesh units to mm, build a structural model (a simple rectangle with 10x5), and write units set to mm, it still gives unfortunately me 0.01 in the MDPA file. I could the Young's modulus is properly scaled with changing line 61 of WriteMaterials.tcl For density, I did not find t/mm³ so this was not possible. On one side, it seems normal to me to have my models in the MPa unit system, but it seems like a pain to change this so this is possible. What do you say? |
I need to think about it this weekend, but it's a pain and can bring future problems |
Yeah, totally understand! If it is still not clear, we can have a quick call early next week. Thanks for your time, much appreciated! |
I generally use the SI-derived engineering MPa unit system, i.e. millimeter, tonne, second, newton, megapascal, etc. In the past I have used a workaround, which requires changing the material files after writing the Kratos model files. This is a bit of pain, especially for my students who are beginning with GiD-Kratos.
Is it possible to do this in a more "native" way? I have found the file
.../GiDx64/gid-14.1.10d/scripts/customLib/customLib/units.xml but to be honest do not really see the workflow on how the MDPA and StructuralMaterials.py files are written in regard to the units.
Any help here would be much appreciated!
The text was updated successfully, but these errors were encountered: