-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
You cannot multiply a FiPy uses the Finite Volume method to discretize PDEs into linear algebra equations. Intrinsic to linear algebra is that I would write eqn0 = TransientTerm(var=x) == ImplicitSourceTerm(coeff=a, var=x) - ImplicitSourceTerm(coeff=b * x, var=y)
eqn1 = TransientTerm(var=y) == ImplicitSourceTerm(coeff=d * y, var=x) - ImplicitSourceTerm(coeff=c, var=y)
eqn = eqn0 & eqn1 (The alternative, eqn0 = TransientTerm(var=x) == ImplicitSourceTerm(coeff=a, var=x) - ImplicitSourceTerm(coeff=b * y, var=x)
eqn1 = TransientTerm(var=y) == ImplicitSourceTerm(coeff=d * x, var=y) - ImplicitSourceTerm(coeff=c, var=y)
eqn = eqn0 & eqn1 would result in two equations that aren't coupled at all. While they would probably solve, they would probably converge more poorly.) |
Beta Was this translation helpful? Give feedback.
-
Beyond that, what you have so far are ODEs rather than PDEs. I'd think that FiPy could solve them, but tools like |
Beta Was this translation helpful? Give feedback.
You can write it either way, but it matters.$f g$ .
ImplicitSourceTerm(coeff=f, var=g)
representsf
can be anything, but the expression can only be implicit (linear) in one variable,g
.By choosing
I chose to represent
or
which creates a (very simplified) block matrix