문제

I'm attempting to solve a complex PDE with FiPy. It would appear that FiPY does not support complex arguments and the general advice seems to be to split the PDE, solve separately and then recombine. Is this still the case?

Secondly, I can't see any way to set non constant initial conditions. Suppose I'd like to have my mesh not have an identical value in every cell, is there a simpler way to do that other than using setValue?

Thank you.

도움이 되었습니까?

해결책

FiPy does not support complex arguments, but it does support solving for vectors, which might simplify your task a bit.

See the latter part of this coupled Cahn-Hilliard simulation.

It's certainly possible to set non-uniform initial conditions. See: examples/cahnHilliard/mesh2DCoupled.py for how to set the initial condition to a random field or examples/diffusion/electrostatics.py and and just about anything in examples/phase/ for how to set the initial condition based on coordinates. As you can see in those examples, there are a couple of different syntaxes that work, but setValue() is a perfectly legitimate way to do it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top