Coupled PDEs with dependent sources formulation #1068
Replies: 1 comment
-
You'll need to work the chain rule to get all of the coefficients inside the derivatives where FiPy expects them, e.g., Alternatively, dig into the derivation of your equations. I'm not a fluids person, but I've found that most presentations assume that
If you have a functional expression for them, then you should write that, e.g., if k = k0 * fp.numerix.exp(-Q/(kB * T)) where
You can, but I would not, write an expression for mass flux, which will update whenever there are changes in the variables it depends on. I wouldn't do this, though, because, as written, Eq. (2) and Eq. (3) will have poor implicit properties. Instead, substitute (3) into (2) to get This puts the second term in the form of a diffusion term in
See |
Beta Was this translation helpful? Give feedback.
-
Please forgive what may be a basic question but I am looking for some guidance on the correct approach of applying FiPy to an existing model. An existing model in the literature for describing polymer decomposition is described by:
The material properties (coefficients) are dependent on the polymer mass fraction$\lambda(y, t)$ and need to be updated at each time step. Similarly, the rate constant $k$ is dependent on temperature according to an Arrhenius style equation and is therefore a function of cell temperature. The mass flux $\dot{m}^{''}_v$ is evaluated at each time step using the computed mass fraction and temperature field (eq. 1).
Generally, I was hoping for some guidance on the implementation. Considering Eq. 1, and trying to separate the terms in the transient-diffusion-convection-source format:
How would I specify the non-unity coefficient of the convective term? Would I need to re-formulate such that the$\rho c_p$ term leading the convective term winds up in the source term such that the general form is respected? My primary question is regarding the computation of the non-constant material properties and other variables that are necessary for the computation of the above equations. Should I define them all as
CellVariables()
such they are handled (somehow) in theeqns.solve()
or should I handle the update of the material properties and assignment independently?There is some documentation for coeffcients that are dependent on the solution variable (i.e. $\rho = \rho(T)$), I'm unsure how to incorporate coeffcients that are dependent on the result of a second, coupled equation. Further, how can I incorporate the results from both equations into the computation of the mass flux (eq. 3) such that the next timestep incorporates the updated values for all fields.
Related, there was a post by @wd15 on the mailing list archive that discussed a problem that is relevant to the phase change - moving interface processes, does anyone know where I can find such an implementation for reference? Particularily interested in how the moving interfaces are treated.
Beta Was this translation helpful? Give feedback.
All reactions