I am having a hard time setting up a problem with moving boundaries. I think the problem comes from the fact that the position of the moving boundary contains a square root.

So I modified the example file ‘1D_stretchx’ to demonstrate my issue.

The first file (1d_stretch_linear) shows the modified file where the position of the right boundary is expressed by lmove=L+alpha*t (L is the initial position of the boundary and alpha is a linear coefficient) which is a linear function. Everything runs very smoothly.

I then modified this file to get (1d_stretch_sqrt) where the position where the position of the right boundary is expressed by lmove=L+alpha*SQRT(t) which is not a linear function. I get a floating point error and I don’t get why.

I know there must be a pretty simple answer to my question but I have been looking around the forum and the help file over the past few days and I haven’t been able to fix my problem. So thanks in advance for your help.