# how to set a fixed value at a volume

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 19, 2022, 04:13 how to set a fixed value at a volume #1 New Member   young4of Join Date: Nov 2021 Posts: 29 Rep Power: 4 Dear all, I want to set the initial value in a volume area and then it doesn't change over time. My first thought was to use setFields, but it sets the field values that change as the simulation progresses, as in the dambreak example. I hope you could give me some suggestions that how to implement it. Thank you for reading! All the best.

 May 24, 2022, 10:23 #2 Super Moderator     Philip Cardiff Join Date: Mar 2009 Location: Dublin, Ireland Posts: 1,091 Rep Power: 34 setFields lets you set "initial" condition. If this is a solution field (i.e. something the solver is solving for) then the internal field will change with time: this is the nature of a boundary value problem. If you already know the internal field, then there is no need to solve the problem. What field are you referring to?

 June 3, 2022, 10:56 #3 New Member   young4of Join Date: Nov 2021 Posts: 29 Rep Power: 4 Hi Philip, It's a field that the solver is going to solve for, like the stress field, which has an initial high stress in a small part of a rock block, and it hardly changes during the compression of the rock block, so I want to fix its value, and the surrounding stress field becomes larger as the pressure increases, and eventually it coincides with the high stress field. I don't know if my expression is helpful to understand.

June 3, 2022, 11:20
#4
New Member

young4of
Join Date: Nov 2021
Posts: 29
Rep Power: 4
Quote:
 Originally Posted by Youngxl Hi Philip, It's a field that the solver is going to solve for, like the stress field, which has an initial high stress in a small part of a rock block, and it hardly changes during the compression of the rock block, so I want to fix its value, and the surrounding stress field becomes larger as the pressure increases, and eventually it coincides with the high stress field. I don't know if my expression is helpful to understand.
Oh, I remember an example, this example is a research topic that I did but didn't do before, about the setting of the phase field of the pre-crack, I was hoping that it could be represented by the formula in the figure, but I don't know how to set it in solids4Foam.
Attached Images
 pfm.JPG (21.8 KB, 14 views)

 June 7, 2022, 06:53 #5 Super Moderator     Philip Cardiff Join Date: Mar 2009 Location: Dublin, Ireland Posts: 1,091 Rep Power: 34 Hi Yang, To be honest, I am still confused as to what you would like to do... :O The solids4foam solid solvers all solve for displacement (or increment of displacement) and maybe pressure too, not stress. Stress is calculated from the displacement field (and from pressure too if that is independent). So there is no way to "fix" the stress field. Unless, maybe you are referring to an initial/residual stress field that gets added to calculated stress. If so, you can provide a "sigma0" field in the 0 directory when using some mechanical laws, e.g. linearElastic.

 Tags fixed values, setfields, volume cell zone