Closed sylvanace closed 1 year ago
You got a meshing error. That's par for the course when working with Comsol. 🤷 Anyway, this is clearly not an issue with MPh. All it does is tell Comsol to mesh and solve the model. And in this case, it then reports back the error Comsol encountered. That's exactly what it's supposed to do.
Hmmm, I'm not sure there is a problem with the mesh, I use the same mesh setting for every loop. It is true that it changes the geometry a little bit but, as I said, it would be fine if I run it again, without changing anything, and running directly in Comsol is not raising any error either.
I am trying to run the simulation with a series of values for a parameter in python (same as parametric study, but can export data easier) but I get this issue for some of the values, and if I run it again for this particular value it works.
Code:
Error: Traceback (most recent call last): File "SourceFile", line 282, in com.comsol.model.impl.StudyImpl.run Exception: Java Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "d:\OneDrive - University of Southampton\PhD\Second Project\Comsol\20230224-Comsol(3D)-ParticleApproach(Cube_vertex-xaxis)\20230225-Comsol(3D)-ParticleApproach(Cube_vertex_xaxis).py", line 16, in
model.solve()
49, in solve
node.run()
File "C:\Users\jy1u18\AppData\Local\Programs\Python\Python311\Lib\site-packages\mph\node.py", line 546, in run
java.run()
com.comsol.util.exceptions.com.comsol.util.exceptions.FlException: Exception:
com.comsol.util.exceptions.FlException: Native object of type MESH is null.
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Error in multiphysics compilation
Failed to load object
Native object of type MESH is null.