Azzera filtri
Azzera filtri

error while simulating comsol code in matlab

25 visualizzazioni (ultimi 30 giorni)
Dear all;
I exported the comsol simulation code exactly as it is. without any modification. (after saving the comsol simulation in .m format, I opened the file in matlab and run the code without any modification so i can simulated it in matlab and then work on optimization side. ; I got the following errors. what should I do to make it work?
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error using Ferdaous (line 4630)
Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Syntax error in expression
Messages:
Failed to evaluate expression for parameter Fzz.
Syntax error in expression.
- Expression: atan( (1/sqrt(((RT+H)/RT))*((RT+H)/RT))-1))-sqrt(((RT+H)/RT))*((RT+H)/RT))-1) )/pi
- Subexpression: )-sqrt(((RT+H)/RT))* ...
- Position: 43
Stack trace:
at com.comsol.util.classes.exprparser.ExprParser.a(SourceFile:75)
at com.comsol.util.classes.exprparser.ExprParser.a(SourceFile:214)
at com.comsol.util.classes.exprparser.ExprParser.a(SourceFile:126)
at com.comsol.util.classes.exprparser.ExprParser.a(SourceFile:273)
at com.comsol.util.classes.exprparser.ExprParser.a(SourceFile:253)
at com.comsol.util.classes.exprparser.ExprParser.a(SourceFile:241)
at com.comsol.nativeutil.parser.ParseUtil.a(SourceFile:1095)
at com.comsol.nativeutil.parser.ParseUtil.a(SourceFile:1066)
at com.comsol.applapi.variables.am.replaceWithCompleteNames(SourceFile:3499)
at com.comsol.model.applapi.UnitConverter.getUnitExpr(SourceFile:647)
at com.comsol.core.parameter.ParamDatabase.a(SourceFile:967)
at com.comsol.core.parameter.ParamDatabase.set(SourceFile:907)
at com.comsol.core.parameter.ParamDatabase.a(SourceFile:867)
at com.comsol.model.dbmodel.ModelParamDb.addParametersToDatabase(SourceFile:235)
at com.comsol.model.method.ModelMethod.updateParamDatabase(SourceFile:3079)
at com.comsol.core.parameter.ParamDatabase.b(SourceFile:141)
at com.comsol.core.parameter.ParamDatabase.a(SourceFile:116)
at com.comsol.model.method.ParamBaseMethod.updateDependentParamDatabases(SourceFile:340)
at com.comsol.model.method.ModelParamMethod.updateDependentParamDatabases(SourceFile:172)
at com.comsol.model.dbmodel.ParamBaseDb.a(SourceFile:165)
at com.comsol.model.dbmodel.ModelEntityDb.handleEvent(SourceFile:958)
at com.comsol.model.data.EventManager.a(SourceFile:650)
at com.comsol.model.data.EventManager.sendEvent(SourceFile:633)
at com.comsol.model.data.EventManager.a(SourceFile:625)
at com.comsol.model.data.EventManager.a(SourceFile:487)
at com.comsol.model.data.MList.a(SourceFile:122)
at com.comsol.model.data.MList.set(SourceFile:432)
at com.comsol.model.dbmodel.ModelParamDb.a(SourceFile:121)
at com.comsol.model.dbmodel.ModelParamDb.b(SourceFile:1)
at com.comsol.model.dbmodel.ParamBaseDb.a(SourceFile:551)
at com.comsol.model.dbmodel.ParamBaseDb.set(SourceFile:515)
at jdk.internal.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.comsol.bridge.command.c.a(SourceFile:147)
at com.comsol.bridge.command.c.run(SourceFile:90)
at com.comsol.bridge.command.l.c(SourceFile:213)
at com.comsol.bridge.command.l.a(SourceFile:203)
at com.comsol.bridge.command.l$1.run(SourceFile:94)
at com.comsol.util.thread.SuspendableTasks$1.run(SourceFile:111)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
>>

Risposte (0)

Categorie

Scopri di più su Problem-Based Optimization Setup in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by