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.

How to know all the variables existing in MPH file via Matlab

Please login with a confirmed email address before reporting spam

Hi,
I have a basic problem which may be simple for most users. I just want to do some further postprocessing for MPH results via Matlab. But, I don't know how to know all the variables existing in MPH file via Matlab. That is to say, for example, if there acturally exists a calculated datagroup denoted by "C" in MPH file, how can I know the "C" exists in Matlab? Otherwise, I cannot operate it via Matlab. It seems that the commands, "mphnavigator" and "mphmodel" can only list the all the objects in the MPH file. Is there a way to list the varialbes or the specific name of all the datagroups calculated in Cosmol ?
For example, If I have performed a COSMOL for Structure Mechanics analysis in order to get the deform gradient tensor, say F, the right Cauchy-Green tensor, say C, and the second PK stress, say S, corresponding to every element, in what way can I directly access the data via Matlab? Which command is responsible for that ?

Thanks for help!!

1 Reply Last Post 15 janv. 2013, 02:58 UTC−5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 janv. 2013, 02:58 UTC−5
Hi,

add this line at the end on you code:

[sz, dof,list,name,type] = mphgetp( model )

the varible 'name' contains your list. See the API guide for furhter information.

Hope it helps,
Mattia
Hi, add this line at the end on you code: [sz, dof,list,name,type] = mphgetp( model ) the varible 'name' contains your list. See the API guide for furhter information. Hope it helps, Mattia

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.