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.

Why can I not use `solid.d` in the Symmetry node?

Please login with a confirmed email address before reporting spam

I have a Solid Mechanics plane strain physics problem, where I use a Symmetry node. If I use a Normal Direction Condition -> Prescribed force, I want to scale the result by the depth of the problem. So logically, I would want to say Fn = 1[MPa] * solid.d * height or similar. However, then I get an error, "Undefined variable. - Variable: comp1.solid.d". If I use solid.d in other context (e.g., a Boundary Load or a Weak Contribution) it works fine.

Is this a bug or is there a subtlety of COMSOL I'm not getting?


1 Reply Last Post 01.08.2023, 03:50 GMT-4
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 01.08.2023, 03:50 GMT-4

The subtle issue is that 'solid.d' is a field which, in principle, can vary over the boundary you are constraining. The force you are prescribing is, however, a single (global) variable. Which value to use is thus not well defined.

One way of handling this is to create a global variable with the same value by picking a value from the domain using a probe or an average operator.

The quickest solution in your case is probably to add a parameter and use it both for prescribing the thickness and the force.

-------------------
Henrik Sönnerlind
COMSOL
The subtle issue is that 'solid.d' is a field which, in principle, can vary over the boundary you are constraining. The force you are prescribing is, however, a single (global) variable. Which value to use is thus not well defined. One way of handling this is to create a global variable with the same value by picking a value from the domain using a probe or an average operator. The quickest solution in your case is probably to add a parameter and use it both for prescribing the thickness and the force.

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.