Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Error in geometry buildup when running a comsol model as an m-file within a matlab loop

Please login with a confirmed email address before reporting spam

Hello all,

I've been working on this for a little whiles and I was wondering if anyone could perhaps shed some light on my issue for me. I have a model which I run on COMSOL with no issue. Yet I wish to complete a pseudo steady state analysis by having certain geometric properties of my model change with respect to outputs produced when the physics is solved. The best way I decided to do so was to save my model as an m-file after clearing all current solutions and reseting the history and then using matlab to iterate through the changes in geometry in response to changes in physics output until my convergence criteria is met. Now when I do so I receive the following error message…

??? Java exception occurred:
Exception:
com.comsol.nativeutil.properties.InvalidPropertyValueException: Invalid property value
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Invalid property value

Invalid property value
- Property: scale

X is Y#Scales#a matrix of real numbers
- : Expected size is (1 – 2147483646) × 2
- Property: scale (Scales)


Stack trace:

at com.comsol.nativeutil.properties.Property.c(Unknown Source)

at com.comsol.nativeutil.properties.Property.b(Unknown Source)

at com.comsol.nativeutil.properties.at.check(Unknown Source)

at com.comsol.nativeutil.properties.Property.getValidDoubleMatrix(Unknown Source)

at com.comsol.model.internal.impl.PropValueImpl.getDoubleMatrix(Unknown Source)

at com.comsol.model.internal.impl.PropFeatureImpl.doGetDoubleMatrix(Unknown Source)

at com.comsol.model.internal.impl.PropFeatureImpl.getDoubleMatrix(Unknown Source)

at com.comsol.geommesh.geom.s.a(Unknown Source)

at com.comsol.geommesh.geom.f.execute(Unknown Source)

at com.comsol.model.internal.impl.GeomFeatureImpl.av(Unknown Source)

at com.comsol.model.internal.impl.GeomSequenceImpl.m(Unknown Source)

at com.comsol.model.internal.impl.GeomSequenceImpl.serverBuild(Unknown Source)

at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)

at com.comsol.server.internal.a.a(Unknown Source)

at com.comsol.server.internal.a.a(Unknown Source)

at com.comsol.server.internal.a$a.a(Unknown Source)

at com.comsol.server.internal.a$a.a(Unknown Source)

at com.comsol.server.internal.a$a$a.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)



at com.comsol.model.clientserver.ClientManagerImpl.a(Unknown Source)

at com.comsol.model.clientserver.ClientManagerImpl.runServerJob(Unknown Source)

at com.comsol.model.internal.impl.GeomSequenceImpl.serverBuild(Unknown Source)

at com.comsol.model.internal.impl.GeomSequenceImpl.E(Unknown Source)

at com.comsol.model.internal.impl.GeomSequenceImpl.aM(Unknown Source)

at com.comsol.model.internal.impl.GeomSequenceImpl$h.a(Unknown Source)

at com.comsol.model.internal.impl.GeomSequenceImpl$h.execute(Unknown Source)

at com.comsol.model.clientserver.ClientManagerImpl$e.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: Exception:
com.comsol.nativeutil.properties.InvalidPropertyValueException: Invalid property value
Messages:
Invalid property value

Invalid property value
- Property: scale

X is Y#Scales#a matrix of real numbers
- : Expected size is (1 2147483646) 2
- Property: scale (Scales)


at com.comsol.nativeutil.properties.Property.c(Unknown Source)

at com.comsol.nativeutil.properties.Property.b(Unknown Source)

at com.comsol.nativeutil.properties.at.check(Unknown Source)

at com.comsol.nativeutil.properties.Property.getValidDoubleMatrix(Unknown Source)

at com.comsol.model.internal.impl.PropValueImpl.getDoubleMatrix(Unknown Source)

at com.comsol.model.internal.impl.PropFeatureImpl.doGetDoubleMatrix(Unknown Source)

at com.comsol.model.internal.impl.PropFeatureImpl.getDoubleMatrix(Unknown Source)

at com.comsol.geommesh.geom.s.a(Unknown Source)

at com.comsol.geommesh.geom.f.execute(Unknown Source)

at com.comsol.model.internal.impl.GeomFeatureImpl.av(Unknown Source)

at com.comsol.model.internal.impl.GeomSequenceImpl.m(Unknown Source)

at com.comsol.model.internal.impl.GeomSequenceImpl.serverBuild(Unknown Source)

at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)

at com.comsol.server.internal.a.a(Unknown Source)

at com.comsol.server.internal.a.a(Unknown Source)

at com.comsol.server.internal.a$a.a(Unknown Source)

at com.comsol.server.internal.a$a.a(Unknown Source)

at com.comsol.server.internal.a$a$a.run(Unknown Source)

... 3 more


Error in ==> netit2 at 1680
model.geom('geom1').run;

Error in ==> diamit at 60
model=netit2(artrad,vc1,vc2,vc3,vc4,vc5,vc6,vc7,vc8,vc9,vc10,…

I believe this error message indicates that MATLAB has difficulty building my model due to the scaling that I include in my geometry makeup. Now unfortunately I can't remove this scaling since it will throw off the entire geometry.

Any advice? Has anyone dealt with similar issues?

I use the 'scale' at multiple locations and typically the script looks something like this in the corresponding m-file

model.geom('geom1').feature('ext25').setIndex('distance', '20', 0);
model.geom('geom1').feature('ext25').set('scale', {'4/5' '4/5'});

1 Reply Last Post 2014年1月24日 GMT-5 13:02

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年1月24日 GMT-5 13:02
I would like to update my post. I used the bush bar model which was available in my model library and modified it in steps and once more when I make use of the scale property I run into similar issues in reference to an error message. I wanted to use a more simplified model in an attempt to trace the potential source for my error.

Thanks

Pat
I would like to update my post. I used the bush bar model which was available in my model library and modified it in steps and once more when I make use of the scale property I run into similar issues in reference to an error message. I wanted to use a more simplified model in an attempt to trace the potential source for my error. Thanks Pat

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.