Hello Johan Gustafsson
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.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
28.12.2010, 03:34 GMT-5
Did you figure it out?
Did you figure it out?
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
04.01.2011, 13:35 GMT-5
No, unfortunately I have not. I worked around the problem by calculating the variables in MATLAB first and then assigning the final value to the COMSOL model. But it would still be nice to be able to get this to work.
Johan
No, unfortunately I have not. I worked around the problem by calculating the variables in MATLAB first and then assigning the final value to the COMSOL model. But it would still be nice to be able to get this to work.
Johan
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
21.12.2011, 06:38 GMT-5
Hi,
If I have a parameter, e.g.:
>> model.param.set('outer_z', '((volume*formfactor^2)/(2*pi))^(1/3)');
How can I in the easiest way evaluate the value of this parameter (like the 'Value'-column in the GUI)?
I get an error message when trying to use:
>> mphglobal(model,'outer_z')
"com.comsol.util.exceptions.FlException: Unknown dataset feature"
Regards,
Johan
The function mphglobal(model,'parameter_name') works for me when calculating parameter values. Maybe there is a problem in your definition of ((volume*formfactor^2)/(2*pi))^(1/3), check that all the parameters are set.
Bye.
[QUOTE]
Hi,
If I have a parameter, e.g.:
>> model.param.set('outer_z', '((volume*formfactor^2)/(2*pi))^(1/3)');
How can I in the easiest way evaluate the value of this parameter (like the 'Value'-column in the GUI)?
I get an error message when trying to use:
>> mphglobal(model,'outer_z')
"com.comsol.util.exceptions.FlException: Unknown dataset feature"
Regards,
Johan
[/QUOTE]
The function mphglobal(model,'parameter_name') works for me when calculating parameter values. Maybe there is a problem in your definition of ((volume*formfactor^2)/(2*pi))^(1/3), check that all the parameters are set.
Bye.
Andrew Prudil
Nuclear Materials
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
12.04.2013, 13:07 GMT-4
Hi everyone,
Sorry for bring back such an old discussion but I'm having the same problem (unknown data set). I think this problem somehow relates to having not initialized the model (but I'm not sure how). Since it cannot find a dataset to evaluate the string in. Anyone know what I'm missing? Consider the simple striped down MATLAB script below which returns the same error. Interestingly enough model.param.get('test_param_a') will return the original string.
Thanks in advance,
Andrew
import com.comsol.model.*
import com.comsol.model.util.*
model = ModelUtil.create('Model');
model.modelPath('F:\FAST\MATLAB');
model.modelNode.create('mod1');
model.geom.create('geom1', 2);
model.geom('geom1').axisymmetric(true);
model.mesh.create('mesh1', 'geom1');
model.param.set('test_param_a', '1[mm]');
temp = mphglobal(model,'test_param_a')
Hi everyone,
Sorry for bring back such an old discussion but I'm having the same problem (unknown data set). I think this problem somehow relates to having not initialized the model (but I'm not sure how). Since it cannot find a dataset to evaluate the string in. Anyone know what I'm missing? Consider the simple striped down MATLAB script below which returns the same error. Interestingly enough model.param.get('test_param_a') will return the original string.
Thanks in advance,
Andrew
import com.comsol.model.*
import com.comsol.model.util.*
model = ModelUtil.create('Model');
model.modelPath('F:\FAST\MATLAB');
model.modelNode.create('mod1');
model.geom.create('geom1', 2);
model.geom('geom1').axisymmetric(true);
model.mesh.create('mesh1', 'geom1');
model.param.set('test_param_a', '1[mm]');
temp = mphglobal(model,'test_param_a')
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
10.03.2014, 13:16 GMT-4
Hi,
If I have a parameter, e.g.:
>> model.param.set('outer_z', '((volume*formfactor^2)/(2*pi))^(1/3)');
How can I in the easiest way evaluate the value of this parameter (like the 'Value'-column in the GUI)?
I get an error message when trying to use:
>> mphglobal(model,'outer_z')
"com.comsol.util.exceptions.FlException: Unknown dataset feature"
Regards,
Johan
I'm also having the same problem, has anyone figured this out?
Thanks,
Mark
[QUOTE]
Hi,
If I have a parameter, e.g.:
>> model.param.set('outer_z', '((volume*formfactor^2)/(2*pi))^(1/3)');
How can I in the easiest way evaluate the value of this parameter (like the 'Value'-column in the GUI)?
I get an error message when trying to use:
>> mphglobal(model,'outer_z')
"com.comsol.util.exceptions.FlException: Unknown dataset feature"
Regards,
Johan
[/QUOTE]
I'm also having the same problem, has anyone figured this out?
Thanks,
Mark
Andrew Prudil
Nuclear Materials
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
10.03.2014, 13:41 GMT-4
It has been a while since I worked with the LiveLink for Matlab. To get a parameter (pellet_length) from Comsol to Matlab I used the following commmand:
pellet_length = mphevalglobalmatrix(model,'pellet_length');
Not sure if this applies only to parameters, or if there is a better way of doing this, but it worked for me.
It has been a while since I worked with the LiveLink for Matlab. To get a parameter (pellet_length) from Comsol to Matlab I used the following commmand:
pellet_length = mphevalglobalmatrix(model,'pellet_length');
Not sure if this applies only to parameters, or if there is a better way of doing this, but it worked for me.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
10.03.2014, 16:01 GMT-4
It has been a while since I worked with the LiveLink for Matlab. To get a parameter (pellet_length) from Comsol to Matlab I used the following commmand:
pellet_length = mphevalglobalmatrix(model,'pellet_length');
Not sure if this applies only to parameters, or if there is a better way of doing this, but it worked for me.
Andrew. Thanks a lot! It turns out that I was able to get
mphglobal(model,'outer_z')
to work too. So it appears I'm in good shape now.
Thanks!
Mark
[QUOTE]
It has been a while since I worked with the LiveLink for Matlab. To get a parameter (pellet_length) from Comsol to Matlab I used the following commmand:
pellet_length = mphevalglobalmatrix(model,'pellet_length');
Not sure if this applies only to parameters, or if there is a better way of doing this, but it worked for me.
[/QUOTE]
Andrew. Thanks a lot! It turns out that I was able to get
mphglobal(model,'outer_z')
to work too. So it appears I'm in good shape now.
Thanks!
Mark
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
02.10.2015, 05:19 GMT-4
model.param.get('outer_z') should work
model.param.get('outer_z') should work