idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.76k stars 1.05k forks source link

Automatic cylinder axis for thermal contact #22318

Open dschwen opened 2 years ago

dschwen commented 2 years ago

Reason

At least in 2D it would be feasible to compute the center of a sideset by averaging positions over the side set. In problems where heat transfer across many concentric gaps needs to be set up this would simplify the inputs.

Design

In 2D average x, y over the length of a sideset (either primary or secondary) to obtain the x, y location of the cylinder axis

Impact

Simplified inputs.

lindsayad commented 2 years ago

I guess from https://github.com/idaholab/moose/pull/22320#discussion_r989562620 and what's in this issue so far, I don't really understand what's desired here geometrically. You only want this capability in a Cartesian coordinate system? What is the axis? The axis of symmetry? This probably would be really obvious if you drew me a graphic 😄 😅

lindsayad commented 2 years ago

Oh I'm guessing it's a complete 2D circle and you're estimating the center of the circle by going around the entire 360 degree sideset?

dschwen commented 2 years ago

Oh I'm guessing it's a complete 2D circle and you're estimating the center of the circle by going around the entire 360 degree sideset?

Yeah, that's it. I should amend the docs.

dschwen commented 2 years ago

I'll factor this code out into a utility namespace and apply it to our other contact methods as well.