I have the following form for finding the motion of a dilute particle cloud, subject to an applied body force and air drag. The air drag expression requires one to take an non-integer power of u, i.e. power(Re_p(u),0.687)
Hi volkerk I think it was working in a previous version of fenics.
When I try solving the problem now I get nan values in the iteration statistics. I read somewhere in the new documentation that it might only work for integer power now.
Hi thank you for the reply. I checked the UFL manual and know you can use the operator, however Iām not sure it works for non-integer powers. When I have the following imports in my file:
import matplotlib.pyplot as plt
from ufl import *
from fenics import *
import numpy as np
import time
And use Re_p**0.687 I get the following in the iteration statistics:
Newton iteration 46: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
I had the same issue. However, I found out what was my mistake. Maybe you have the same mistake too. you can not have a negative number with non-integer power. Herein, I consider all of your parameter values are positive. So, Sometimes for numerical solvers maybe the solver estimates a negative value for your parameters which raises the issue. To solve this issue, you can easily use abs function for your parameters to fix the issue.
Hi, I take the absolute value of the speed before it goes into the function as Re_p so that is taken care of. Maybe that part of UPL was fixed I wrote this work around a while ago