In the attached sample code, I am trying to emulate isotropic thermal expansion of a RHS beam, attached at one end. Basically, I expect the beam to expand/inflate as a function of temperature.
I am having a number of troubles making the model work effectively. I find it extremely sensitive to the definition of the f_coefficient. For example, running the code with centre_correction equal to zero (in fcoef_thermal line 12), the result is crazy, but with a small change to centre_correction = [-0.01254135,0,0.000265225] the result is more reasonable.
To resolve this, it seems that I need to adjust the force term to make some allowance for the geometry of the Mesh model, and possibly even including some way of damping the force depending on the displacement in order to get a more realistic result. This is proving difficult:
The Gauss points sent to the f_coefficient function appear to be 2450 rather randomly selected points from the list in model.Mesh.Nodes. In this instance, as the solver repeatedly sends requests to fcoef_thermal, the coordinates of the request [region.x, region.y, region.z] do not change throughout execution. There is also no change to the values in state.u . (This is confusing, because ultimately the solver does calculate a deflection). Why does state.u not change throughout the calculation?
If none of the inputs to region or state change during execution, how I could implement a deflection dependent output for f_coefficient?
Further, in 3D, the field region.subdomain doesn't identify which node is requested. This is inconvenient because searching or interpolation would be required to just identify a point we could already index straight from the model.Mesh.Nodes list.
Any suggestions would be much appreciated.