Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Post-processing of mph files with script or matlab

Please login with a confirmed email address before reporting spam

Hi all.
It is likely a trivial question but I could not sort out the answer by myself.

Position of the problem:
I am solving a 2-dim time-dependent PDE model, with dependent variables u(x,y,t), v(x,y,t),k(x,y,t),p(x,y,t).

Since simulations need to run over long times, I produced a set of .mph files: the first one
saves the state of the model from t = 0 to t = T1, the second one starts from T1 to t = T2 and so forth,...

Out of all the data produced I need to make statistical analysis on the variables u,v,k,p just at few spatial locations.

I am running version 3.5 (NOT 3.5a), hence I may use comsol script. On the other hand, have not access to
Matlab easily (I could arrange it, if necessary, but would rather not).

In conclusion, I would like to write a script that
a) load sequentially the .mph files
b) for each simulation extracts the arrays u,v,k,p at the locations selected and assembles them into one single array
c) makes the postprocessing. This seems the easy part.

However, up to now, I only used COMSOL through its graphical interface, so am quite unexperienced
with scripting.
I anticipated that it looks like trivial, but from reading the user's guide, I was not able to understand
how doing point (a).


Thanks for your cooperation

Fabio

0 Replies Last Post 19 mai 2010, 05:08 UTC−4
COMSOL Moderator

Hello Fabio Sattin

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.