-
Hello all, I am currently working with a complicated dynamic adsorption process using FiPy. I have trouble in representing equations using FiPy terms, due to the intricate equation structures. To help solve the problem, I only give a small part of the entire PDE system as a simple example, as shown below. Overall mass balance (Eq1): All variables except for It is well known that, the solution to a quadratic equation can be obtained by After reformulating Eq2, a quadratic equation can be obtained ( Therefore, In this way, Eq2 can be eliminated. The PDE system has only one equation and one variable In this way, I attempted to solve this problem using FiPy. My current concern is to figure out if this structurally complicated PDE system is correctly represented. This would be of great importance in helping formulate the original PDE system and find a potential solution to it. Here I attach my code for debugging.
Unfortunately, there are problems in solving the equation caused by the calculation of Alternatively, I was wondering if there is any solution that can consider Let me know if any aspect was not clearly presented. Thank you :-) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
A time derivative is not necessary for a FiPy equation, but I agree it's probably better to eliminate the Ergun equation as you have done. I think what you have is OK and the reason that the solutions look wrong is because the time step is too large. Advective equations must obey the CFL condition, such that nothing is advected across more than one grid space in a time step. At Additional things that might improve the solution:
|
Beta Was this translation helpful? Give feedback.
A time derivative is not necessary for a FiPy equation, but I agree it's probably better to eliminate the Ergun equation as you have done.
I think what you have is OK and the reason that the solutions look wrong is because the time step is too large. Advective equations must obey the CFL condition, such that nothing is advected across more than one grid space in a time step. At$t=0$ , $\Delta x / |v| \approx 0.00016$ . If I set
timeStepDuration = 0.0001
, I get smoothly evolving solutions.Additional things that might improve the solution:
VanLeerConvectionTerm
tends to preserve shapes better for purely convective equations.v
is a function ofP.grad
, sweeping may produce more accu…