Data from Evaluation Group #184
Replies: 1 comment
-
Depends what you mean by "directly". There's no API method for accessing the data in a Comsol table. The API methods are the "convenience" functions that MPh provides. So if convenience is what you're looking for, then no. It's certainly possible though, given that you can access the full Comsol API. I wouldn't call the Comsol API "convenient", which is why we have our own API. It's just easier to use. But your answer is to be found "somewhere" in the Comsol Programming Reference Manual. (Which is "only" 1182 pages long.) Once you know how to do it in Java, doing the same thing in Python is straightforward. See also the pinned discussion. There is an API method for evaluating Comsol expressions: |
Beta Was this translation helpful? Give feedback.
-
Hey,
my general request is, how do i directly address simulated data from an mph file in python.
My case is that I set up and simulate everything in Comsol in box. In the end, I have an evaluation group including a general transformation over three surface averages. I can then plot in box in Comsol the results from this evaluation group in a table graph.
But I would love to get this data that fuels the plot in Comsol (Table from Evaluation group) out in python. My workaround at this time is to export the evaluation group table as .txt and import this in python.
But is there a way via mph to directly get the data from an evaluation group out of an .mph file into python? This would be very convenient for me. If yes, how?
Best,
Johannes
Beta Was this translation helpful? Give feedback.
All reactions