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.

postprocessing a new variable in matlab linked with comsol

Please login with a confirmed email address before reporting spam

Hi
i built a model in comsol and solved it in matlab. i have to add some new variables in matlab code. when i solve the code again, i can not plot these new variables. for example i have a variable named "CC" and
postplot(fem, ...
'tridata',{'CC','cont','internal','unit','Pa'}, ...
'trimap','Rainbow', ...
'title','Surface: Pressure [Pa]', ...
'axis',[-0.18761703121535322,0.08761702227465648,-0.08600000590085984,0.04599999934434891]);

it shows this error

xception:
com.femlab.jni.FlNativeException: Failed to evaluate expression
Messages:
Failed to evaluate expression
- Expression: CC

Failed to evaluate variable
- Variable: CC
- Geometry: 1
- Subdomain: 1

Undefined post expression

How can i plot my new variable?

any answer would be appriciated


with best regards,
fatemeh sharifi

2 Replies Last Post 2010年11月17日 GMT-5 02:11
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年11月16日 GMT-5 15:02
Hi

I understand the message as if your variable CC isnot defined on that particular domain, so either you exclude the domain, or you ensure that the variable CC is sufficiently "global", and has a meaning over the full geoemtry.

Check the definition of CC and see if you have not selected some local instad of a global validity region

--
Good luck
Ivar
Hi I understand the message as if your variable CC isnot defined on that particular domain, so either you exclude the domain, or you ensure that the variable CC is sufficiently "global", and has a meaning over the full geoemtry. Check the definition of CC and see if you have not selected some local instad of a global validity region -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年11月17日 GMT-5 02:11
Hi Ivar,
Thank you for your attention. i have to plot my new variable over my domain so i can't exclude it from domain. I define some global expression ('H' )for my model but in matlab this variable is not updated( i could'nt for example set my new variable 'CC' as my previous global expression (H=CC))

How can i introduce my CC as an global variable so i can plot it over my domain and use it in other part of my problem?


Thank you very much
With Best Regards,

Fatemeh Sharifi
Hi Ivar, Thank you for your attention. i have to plot my new variable over my domain so i can't exclude it from domain. I define some global expression ('H' )for my model but in matlab this variable is not updated( i could'nt for example set my new variable 'CC' as my previous global expression (H=CC)) How can i introduce my CC as an global variable so i can plot it over my domain and use it in other part of my problem? Thank you very much With Best Regards, Fatemeh Sharifi

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.