简体   繁体   English

如何用边界条件求解微分方程,其中之一是使用python的不等式

[英]How to solve a differential equation with boundary conditions, which one of them is a inequality using python

It is possible to set a boundary condition like psi(z>L)< eps ? 可以设置psi(z> L)<eps?

I have a system: 我有一个系统:

dD/dz = ....  
dPsi/dz = ....   

And boundary conditions: 和边界条件:

D(0) = 1,6*Pi  
Psi(z>L) < eps

I read about scipy.integrate.solve_bvp and odeint , but all examples have boundary conditions like: y(0) = y(1) = 0 我了解了scipy.integrate.solve_bvp和odeint,但是所有示例的边界条件如下: y(0) = y(1) = 0

Does anyone know how to set such condition? 有谁知道如何设置这种条件?

It would be easier to answer, if you provided a bit more info about the problem. 如果您提供了有关该问题的更多信息,则将更容易回答。 If I understand correctly, L is the limit of your integration, so the boundary condition is actually 如果我理解正确,则L是积分的极限,因此边界条件实际上是

Psi(L)=eps

In case you integrate beyond L, you will probably need to have a condition to check on each iteration (new point, etc). 如果积分超出L,则可能需要有一个条件才能检查每次迭代(新点等)。 Something along the lines: 大致情况:

if z>L and Psi(z)>=eps:
    do the action

What this action should be would depend on the problem. 此操作应采取何种措施取决于问题。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM