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.
Undefined variable comp1.material.vn error in corrosion simulation
Posted 2024/12/05 4:54 JST Corrosion & Corrosion Protection 0 Replies
Please login with a confirmed email address before reporting spam
Hello all,
I have recently started working with COMSOL to model the corrosion effects of an anode in water with 3D simulation (Corrosion, Secondary physics). I am getting an error when attempting to compute the simulation as seen below. Boundary 4 of the geometry is the top surface of a cylinder with a hole in it, continuing into the cylinder to simulate an anode hanging from the top of a cylindrical tank of water.
I believe most of this error is just equations that cannot compute because of the undefined variable, but I cannot find where this variable is located or defined. I had a similar error before with sigmal but was able to define that one. Any advice would be appreciated. Thank you.
- Feature: Stationary Solver 1 (sol1/s1)
Failed to evaluate initial residual for segregated step 2.
Undefined variable.
- Variable: comp1.material.vn
- Geometry: geom1
- Boundary: 4
Failed to evaluate expression.
- Expression: comp1.material.vn
Failed to evaluate operator.
- Operator: mean
- Geometry: geom1
- Edges: 15-16, 19, 22
Failed to evaluate expression.
- Expression: mean(comp1.material.vn)
Failed to evaluate variable.
- Variable: comp1.material.vn
- Geometry: geom1
- Edges: 15-16, 19, 22
Failed to evaluate variable.
- Variable: comp1.material.vtproj
- Defined as: comp1.material.vn*if(((((comp1.material.ndefX*(comp1.desdg1.tnondefx*comp1.spatial.invF11))+(comp1.material.ndefY*(comp1.desdg1.tnondefy*comp1.spatial.invF22)))+(comp1.material.ndefZ*(comp1.desdg1.tnondefz*comp1.spatial.invF33)))<=0)&&(comp1.material.vn<=0),0,if(((comp1.material.vn*(((comp1.material.ndefX*(comp1.desdg1.tnondefx*comp1.spatial.invF11))+(comp1.material.ndefY*(comp1.desdg1.tnondefy*comp1.spatial.invF22)))+(comp1.material.ndefZ*(comp1.desdg1.tnondefz*comp1.spatial.invF33))))*(((comp1.material.ndefX*comp1.material.nndefX)+(comp1.material.ndefY*comp1.material.nndefY))+(comp1.material.ndefZ*comp1.material.nndefZ)))>=0,1,(((comp1.material.ndefX*(comp1.desdg1.tnondefx*comp1.spatial.invF11))+(comp1.material.ndefY*(comp1.desdg1.tnondefy*comp1.spatial.invF22)))+(comp1.material.ndefZ*(comp1.desdg1.tnondefz*comp1.spatial.invF33)))^2))
Failed to evaluate expression.
- Expression: ((((comp1.material.Xt_free*comp1.material.ndefX)+(comp1.material.Yt_free*comp1.material.ndefY))+(comp1.material.Zt_free*comp1.material.ndefZ))-comp1.material.vtproj)*dvol_mesh
Failed to evaluate Jacobian of expression.
- Expression: ((comp1.material.Xt_free*comp1.material.ndefX+comp1.material.Yt_free*comp1.material.ndefY+comp1.material.Zt_free*comp1.material.ndefZ-comp1.material.vtproj)*test(comp1.material.lm_nv))*(dvol_mesh)
Attachments:
Hello Vincent Giannetti
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.