Undefined variable comp1.material.vn error in corrosion simulation

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)



Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.