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 on symmetry boundaries

Please login with a confirmed email address before reporting spam

I have a model where i calculate the electric field in the vicinity of a nano particle in a box of width w centered a 0 so both x, y and z run from -w/2 to w/2 across the domain. Due to symmetry, i can restrict the calculation to 1/4 of the domain, e.g. x > 0 and y > 0. After the calculation, i export the electric field in the xy, xz and yz planes. However, only some times COMSOL suceeds in evaluating the field. Often i get an error like:

/*****Error********/
/******************/
Cannot evaluate expression.
Undefined variable.
- Variable: comp1.ewfd.Ey - Geometry: geom1 - Domain: 44
Failed to evaluate expression.
- Expression: comp1.ewfd.Ey

I have figured out that the error is caused by the field some times not being evaluated at the symmetry boundaries, i.e. if i shift the evaluation slight away (e.g. by evaluating the xz plane at y = 1 nm rather than y = 0), the error vanishes. I can also "fix" the error by running the simulation multiple times for slightly different values of w (e.g. i start with w=5000 nm, then try w=5100 nm and so on) until i "get lucky" and the export succeeds.

My guess is that it all boils down to the location of mesh nodes relative to the symmetry boundary. However, i am not sure how to fix the problem properly. Is there any way to force COMSOL do "include" the boundary in the domain which is being evaluated?

Cheers,
Emil

0 Replies Last Post 2017年1月13日 GMT-5 02:25
COMSOL Moderator

Hello Emil Eriksen

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.