I've stripped all the physical-significance for clarity, but I know that u[x,t] will be everywhere positive and continuous.
here are the equations in Mathematica code:
eqs = {D[u[x, t], {x, 2}] == D[u[x, t], t],
u[x, 0] == c1,
(D[u[x, t], x] /. x -> 1) == 0,
u[0, t] == 3 c2 - c2 Integrate[u[x, t], {x, 0, 1}]} /. {c1 -> 1, c2 -> 1}
The dependent variable u represents pressure, x represents distance and t time.
The last item in eqs
represents a material-balance on the gas in the system - the integral is the amount of gas distributed in the region of interest - it accounts for gas in the region of interest, stating that
gas in region-of-interest +
gas in the isobaric region at the surface (not of interest)
=
amount of gas in the entire system at time t=0 (represented by u[x,0]==c1 and the addition of 3 C2 - I stripped numerous physical symbols out so while the equations appear flaky, it's the shape that is of interest, not the internal consistency of the simplified equations).
When I try to solve this in Mathematica, regardless of whether I use Integrate or NIntegrate I get errors:
NDSolve[eqs, {x, 0, 1}, {t, 0, 1}]
When using Integrate.... I get:
Equation or list of equations expected instead of .... (integral here)
When using NIntegrate I get:
The integrand u[x,t] has evaluated to non-numerical values
(this error message is no surprise - just including it for completeness).
I modeled this using years ago for some graduate research, and got good solutions (I built the physical system in a lab and measured transient pressure profiles etc. to validate model results, so it's a real-world problem. Now I want to see if I can solve it again with Mathematica).
The actual BC is this:
P[x,t] is the dependent variable; x & t are independent variables, everything else is a known constant.
No postings I can find here or on Wolfram.com indicate how or if MMA can do this.
I would like to know if anyone has solved a similar problem (boundary condition containing an integral of the solution itself) using MMA, and how it might be done.
u[0, t] = 3 c2 - c2 ...
should beu[0, t] == 3 c2 - c2 ...
andNDSolve[eqs, {x, 0, 1}, {t, 0, 1}]
should beNDSolve[eqs, u, {x, 0, 1}, {t, 0, 1}]
, although fixing them leads to other error messages. $\endgroup$c2 -> 0
instead of1
allowsNDSolve
to produce an answer, although this is not the problem you wish to solve. In my experience, you need to discretize your integral boundary condition to make headway. $\endgroup$