Is it possible to automatically read Ansys Mechanical available inputs #449
-
Good day, I'm truing to find the way automatically how to get inputs (boundary conditions) from Ansys Mechanical to replace the values of them on the new one and perform calculation. the approaches I saw before were based of manual finding the values in ds.dat file. Is there any way to automate this process, like loading project file and recognition will provide me all data (boundary conditions) can be changed for simulation? If yes, could you recommend what file type should be used (*.dat, *.cdb, etc) Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 12 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Hello Valentyn, As per our discussion, please have a look at the below at the below post in developer's forum to use PyMechanical to replace boundary conditions based on CSV input. hope this helps. If you have any questions, please feel free to comment there. |
Beta Was this translation helpful? Give feedback.
-
Hello Rohith,
Thank you for the example. Our developers informed me that their understanding is much closer to the required. The one nuance we cannot understand. In the example, the value of a variable is replaced by method GetObjectsByName and name is taken from *.csv file. How this *.csv file is prepared? Is it somehow exported from Mechanical project OR User should create this file manually? If 2nd, then how User knows what variables are in the *.mechdat file. In this case we should have complete correspondence between *.csv file and *.mechdat file, and this correspondence , I would say, impossible for manual work.
We assume that we could miss important nuance regarding exporting *.csv from Mechanical project or reading variables from *.mechdat.
Could you please clarify?
Best regards,
Valentyn
From: Rohith Gandhi Patchigolla ***@***.***>
Sent: Tuesday, October 24, 2023 5:44 PM
To: ansys/pymechanical ***@***.***>
Cc: Valentyn Barannik ***@***.***>; Author ***@***.***>
Subject: Re: [ansys/pymechanical] Is it possible to automatically read Ansys Mechanical available inputs (Discussion #449)
Hello Valentyn,
As per our discussion, please have a look at the below at the below post in developer's forum to use PyMechanical to replace boundary conditions based on CSV input.
https://discuss.ansys.com/discussion/2607/transfer-convection-coefficient-and-ambient-temperature-data-from-csv-to-mechanical-via-pymechanical/p1?new=1
hope this helps.
If you have any questions, please feel free to comment there.
—
Reply to this email directly, view it on GitHub<#449 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDEU3RA7HMSELFYNS7KAFJ3YA7H3NAVCNFSM6AAAAAA52I6AC2VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TGNZRGEYTA>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Hello Valentyn, Please find attached a script to do the same task with Embedded method. Also please find in the below discussion on differences between Remote and Embedded sessions. But main difference is that Mechanical APIs are available directly in Python space.
|
Beta Was this translation helpful? Give feedback.
-
Hello @ValentynBarannik , Is your workflow now working with Embedded approach I proposed? Best regards, |
Beta Was this translation helpful? Give feedback.
Hello Valentyn,
Please find attached a script to do the same task with Embedded method. Also please find in the below discussion on differences between Remote and Embedded sessions. But main difference is that Mechanical APIs are available directly in Python space.
#476