Dear FiPy Users! I would like to solve a system of partial differential equations describing the conservation of water mass and heat when passing through a packed bed reactor of porous material. I did a bit of general research on that topic and, in terms of mathematical terminology, mostly arrived at "1D advection problems with source".
The continuity equations for the water mass in the carrier gas and the adsorbent respectively are written as I) eps_G * rho_G * (\partial X_G / \partial t) + m_G_dot * (\partial X_G / \partial x) = - m_GS_dot II) eps_S * rho_S * (\partial X_S / \partial t) = m_GS_dot The continuity equations for the heat are written as III) eps_G * rho_G * c_G_star * (\partial T_G / \partial t) + m_G_dot * c_G_star * (\partial T_G / \partial x) = q_GS_dot IV) eps_S * rho_S * c_S_star * (\partial T_S / \partial t) = -q_GS_dot + m_GS_dot * h_ads So far we used to solve these equations with Matlabs pdepe solver which, as I learned recently, shouldn't work at all for these equations since it is meant for parabolic and elliptic PDEs while we are dealing with hyperbolic ones. Former colleagues nevertheless somehow got it to work by, as I assume, playing around with the formulation of the boundary conditions until the solver would run. Surprisingly, the values were still reasonable enough so that this was accepted for some years now. I would like to change that now and carry the simulation over to Python and FiPy. Question 1: Can I do that and how would I do that? Question 3: How do I incorporate the fact that most of the factors (like rho_G, c_G/S_star, m_GS_dot, q_GS_dot, and h_ads) are functions of one or more solution variables? Question 4: We usually formulate the initial condition as some sort of equilibrium state of the packed bed reactor, like the initial water content of the gas phase X_G_init = X_G_init(X_S_init, T_G_init, T_S_init) the initial water content of the adsorbent X_S_init the initial temperature of the gas phase T_G_init the initial temperature of the adsorbent T_S_init and the boundary condition at the "entrance" or "left boundary" of the reactor as the conditions of the incoming gas, like the water content of the incoming gas X_G_in the water content of the adsorbent at the entrance X_S_in = X_S_in(X_G_in, T_G_in, T_S_in) the temperature of the incoming gas T_G_in the temperature of the adsorbent at the entrance T_S_in How is this done in the case of FiPy? Question 5: In Matlab I set the x_grid for the spatial discretization. The t_grid is just to tell Matlab where (or rather when) I want it to return the values of the solution. The actual time step is adapted automatically by Matlab according to the needs of the problems. Sometimes here the solver returns the message that the time step could not be further reduced because some limit was hit and no solution could be found. How do I determine a sensible time step in FiPy? I am sorry for asking so many questions all at once but from studying the 1D level set advection example I didn't gain enough understanding for my actual problem. Thanks in advance for any help! Markus _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]