Chien Liu
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
7 years ago
26 mars 2018, 16:21 UTC−4
Dear Dragon, You can either express the vector components with expressions, such as
comp1.genext1(withsol('sol1',u))*X/sqrt(X^2+Y^2)
for the X component, or, perhaps more conveniently, take advantage of COMSOL's built-in coordinate system capabilities - in this case use the Cylindrical System for the Initial Values node, as shown in the attached example.
Please feel free to contact support if you need further assistance.
Sincerely,
Chien
Dear Dragon, You can either express the vector components with expressions, such as
comp1.genext1(withsol('sol1',u))*X/sqrt(X^2+Y^2)
for the X component, or, perhaps more conveniently, take advantage of COMSOL's built-in coordinate system capabilities - in this case use the Cylindrical System for the Initial Values node, as shown in the attached example.
Please feel free to contact support if you need further assistance.
Sincerely,
Chien
Please login with a confirmed email address before reporting spam
Posted:
7 years ago
26 mars 2018, 22:23 UTC−4
Dear Chien,
Thank you for your suggestions very much.
Actually, I tried the approach by setting, comp1.genext1(withsol('sol1',u))X/sqrt(X^2+Y^2), as the initial value. However, the error will occur when the coordinates of X and Y are both zeros, namely at the origin, since zero can not be as the denominator. I got the error message in COMSOL.
I also tried the second way to build an Cylindrical System like you metioned which was used in the initial value settings. The thing confusing me is that, when the different element sizes are used, some element sizes will result in correct answer, but some will not. An error message jumps out, like:
Attempt to evaluate negative power of zero.
- Function: ^
Failed to evaluate temporary symbolic derivative variable.
- Variable: comp2.sys3.r@VDN$x
- Defined as: (x2)((((x^2)+(y^2))^(-0.5))0.5)
Failed to evaluate variable.
- Variable: comp2.sys3.T11
- Defined as: d(comp2.sys3.r,x)/sqrt(((d(comp2.sys3.r,x)^2)+((d(comp2.sys3.phi,x)comp2.sys3.r)^2))+(d(comp2.sys3.a,x)^2))
Failed to evaluate expression.
Even for your attached model, if the element sizes are changed to fine or extremely fine, the same error message will occur. I am wondering the resaon casuing the error message is that the coordinate transform between Cylindrical and Cartersian is related to the meshing desinty. But even using the extremely fine mesh density, we still get the error message. Could you inspect this problem a little deeper?
Thank you so much. I look forward to hearing from you.
Best Regards,
Dragon
Dear Chien,
Thank you for your suggestions very much.
Actually, I tried the approach by setting, comp1.genext1(withsol('sol1',u))X/sqrt(X^2+Y^2), as the initial value. However, the error will occur when the coordinates of X and Y are both zeros, namely at the origin, since zero can not be as the denominator. I got the error message in COMSOL.
I also tried the second way to build an Cylindrical System like you metioned which was used in the initial value settings. The thing confusing me is that, when the different element sizes are used, some element sizes will result in correct answer, but some will not. An error message jumps out, like:
Attempt to evaluate negative power of zero.
- Function: ^
Failed to evaluate temporary symbolic derivative variable.
- Variable: comp2.sys3.r@VDN$x
- Defined as: (x*2)*((((x^2)+(y^2))^(-0.5))*0.5)
Failed to evaluate variable.
- Variable: comp2.sys3.T11
- Defined as: d(comp2.sys3.r,x)/sqrt(((d(comp2.sys3.r,x)^2)+((d(comp2.sys3.phi,x)*comp2.sys3.r)^2))+(d(comp2.sys3.a,x)^2))
Failed to evaluate expression.
Even for your attached model, if the element sizes are changed to fine or extremely fine, the same error message will occur. I am wondering the resaon casuing the error message is that the coordinate transform between Cylindrical and Cartersian is related to the meshing desinty. But even using the extremely fine mesh density, we still get the error message. Could you inspect this problem a little deeper?
Thank you so much. I look forward to hearing from you.
Best Regards,
Dragon
Chien Liu
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
7 years ago
29 mars 2018, 14:42 UTC−4
Dear Dragon, If a mesh point happens to land on the Z axis (X=Y=0), then the error that you described may occur. You can shift the 3D geometry away from the Z axis to avoid this issue.
Please feel free to contact support if you need further assistance.
Sincerely, Chien
Dear Dragon, If a mesh point happens to land on the Z axis (X=Y=0), then the error that you described may occur. You can shift the 3D geometry away from the Z axis to avoid this issue.
Please feel free to contact support if you need further assistance.
Sincerely, Chien