Lars Gregersen
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
28 apr 2017, 11:34 GMT-4
Hi Vladimir
It works for me.
What version of Comsol are you using?
What is the exact error message?
--
Lars Gregersen
Comsol Denmark
Hi Vladimir
It works for me.
What version of Comsol are you using?
What is the exact error message?
--
Lars Gregersen
Comsol Denmark
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
29 apr 2017, 09:27 GMT-4
Updated:
8 years ago
29 apr 2017, 09:27 GMT-4
Hi Lars,
I'm using COMSOL 5.2 (version: 220).
Here is the code:
pd=mpheval(model,'d(es.normE*es.normE,x) d(es.normE*es.normE,y)','selection','pointi');
Here is the message:
Error using mpheval (line 328)
mpheval (174): Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Syntax error in expression
(rethrown as com.comsol.util.exceptions.FlException)
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Syntax error in expression
Syntax error in expression
Erreur de syntaxe dans une expression.
- Expression: d(es.normE*es.normE,x) d(es.normE*es.normE,y)
- Sous-expression: d(es.normE*
- Position: 2
Vladimir
Hi Lars,
I'm using COMSOL 5.2 (version: 220).
Here is the code:
pd=mpheval(model,'d(es.normE*es.normE,x) d(es.normE*es.normE,y)','selection','pointi');
Here is the message:
Error using mpheval (line 328)
mpheval (174): Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Syntax error in expression
(rethrown as com.comsol.util.exceptions.FlException)
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Syntax error in expression
Syntax error in expression
Erreur de syntaxe dans une expression.
- Expression: d(es.normE*es.normE,x) d(es.normE*es.normE,y)
- Sous-expression: d(es.normE*
- Position: 2
Vladimir
Lars Gregersen
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
2 mag 2017, 03:15 GMT-4
Hi
You are doing it wrong ;-)
If you wish to evaluate more than one expression you should put them in a cell array:
pd=mpheval(model, {'d(es.normE*es.normE,x)' 'd(es.normE*es.normE,y)'}, 'selection', 'pointi');
--
Lars Gregersen
Comsol Denmark
Hi
You are doing it wrong ;-)
If you wish to evaluate more than one expression you should put them in a cell array:
pd=mpheval(model, {'d(es.normE*es.normE,x)' 'd(es.normE*es.normE,y)'}, 'selection', 'pointi');
--
Lars Gregersen
Comsol Denmark
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
2 mag 2017, 05:15 GMT-4
Hi,
Ok, i'm confused because this command works well:
pd=mpheval(model,'V es.normE es.Ex es.Ey','selection','pointi');
I have another question. When i evaluate with pointi defined as follow:
model.selection.create('pointi','Ball');
model.selection('pointi').set('posx','L/2');
model.selection('pointi').set('r','8');
model.selection('pointi').set('entitydim',0);
model.selection('pointi').set('condition','inside');
this select only, if any, the geometrical point inside the Ball.
If i want to create a selection on all the mesh node inside pointi, should i create firstly a geometrical domain according to pointi ?
Hi,
Ok, i'm confused because this command works well:
pd=mpheval(model,'V es.normE es.Ex es.Ey','selection','pointi');
I have another question. When i evaluate with pointi defined as follow:
model.selection.create('pointi','Ball');
model.selection('pointi').set('posx','L/2');
model.selection('pointi').set('r','8');
model.selection('pointi').set('entitydim',0);
model.selection('pointi').set('condition','inside');
this select only, if any, the geometrical point inside the Ball.
If i want to create a selection on all the mesh node inside pointi, should i create firstly a geometrical domain according to pointi ?
Lars Gregersen
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
19 mag 2017, 04:11 GMT-4
Hi Vladimir
Ok, i'm confused because this command works well:
pd=mpheval(model,'V es.normE es.Ex es.Ey','selection','pointi');
Yes, this is a feature, but this feature only works with simple expressions and not when you are using functions with multiple parameters.
Selections work on the geometry level. Why do you need a selection of the interior mesh points?
--
Lars Gregersen
Comsol Denmark
Hi Vladimir
[QUOTE]
Ok, i'm confused because this command works well:
pd=mpheval(model,'V es.normE es.Ex es.Ey','selection','pointi');
[/QUOTE]
Yes, this is a feature, but this feature only works with simple expressions and not when you are using functions with multiple parameters.
Selections work on the geometry level. Why do you need a selection of the interior mesh points?
--
Lars Gregersen
Comsol Denmark