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.

Java NullPointerException Error

Please login with a confirmed email address before reporting spam

Hello,

I'm running a Comsol model through Matlab that consists of 10 user-defined PDEs. The process I model is cyclic, and has four steps per cycle. Each step has different boundary conditions, but the same PDEs. The model I created simulates 1 complete cycle, and I use Matlab to run the model over and over to simulate the entire process. I created the model in the Comsol GUI, and auto-generated the Matlab script. I then copy and pasted the code into my existing Matlab code. In Matlab, I have two functions that use Comsol code: (1) builds the geometry, mesh physics and sets up the studies/solutions for each step in the cycle and (2) updates the studies with time vectors and solves the model. I'm getting a Java NullPointerException error that I am unfamiliar with, and was wondering if anyone could provide insight. The error occurs in the code:
model.sol('sol1').runAll;

Thanks,
Matt

0 Replies Last Post Jul 7, 2015, 1:35 p.m. EDT
COMSOL Moderator

Hello Matt Urich

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.

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.