Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Equation Solving sorted by activeNDSolveValue error: fewer dependent variables
https://community.wolfram.com/groups/-/m/t/3219257
i need your help plz i have an issue it show me error that you have fewer dependent variable than equation but i have 4 equation and 4 dependent variable sir please check it be the issue
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/bfe7e50e-793c-4811-a4bc-b19237f28f04Abid Hussain2024-07-12T16:45:02ZNumerically solved PDE of Ornsteinâ€“Uhlenbeck process on simplex violates conservation of probability
https://community.wolfram.com/groups/-/m/t/3214694
Thanks for your consideration.
I'm working to create a solution of an Ornstein-Uhlenbeck process with a force that takes mass towards the centre of a Simplex. I'm assuming absorbing boundaries.
The Mathematica code below quickly provides a solution. However, the probability mass within the domain grows significantly early, but it should only ever diminish, due to mass being absorbed.
I don't think the error lies in my formulation of the forward Kolmogorov (Fokker-Plank) equation.
If it doesn't lie there, I suppose it could lie in the numerical approximation, with errors growing? I greatly appreciate any insight into this problem.
![enter image description here][1]
![enter image description here][2]
ClearAll["Global`*"]
\[Eta] = 5.; (*side length*)
xopt = {\[Eta]/2, \[Eta]/(2 Sqrt[3])}; (*centroid*)
\[Kappa] = .75; (*rate of reversion to centroid,diffusion constant=1*)
Tmax = 5.; (*length of time*)
\[CapitalOmega] =
Polygon[Rationalize[{{0, 0}, {\[Eta],
0}, {\[Eta]/2, (\[Eta] Sqrt[3])/2}},
0]]; (*domain is equilateral triangle*)
bC = Rationalize[DirichletCondition[P[x1, x2, t] == 0, True],
0]; (*absobing boundary condition*)
iC = Rationalize[
P[x1, x2, 0] ==
Piecewise[{{1/((Sqrt[3] \[Eta]^2)/4),
RegionMember[\[CapitalOmega], {x1, x2}]}}, 0],
0]; (*uniform initial condition*)
(*forward Kolmogorov equation*)
fwrdKol =
Rationalize[
D[P[x1, x2, t],
t] == -D[\[Kappa] (xopt[[1]] - x1)*P[x1, x2, t], {x1, 1}] -
D[\[Kappa] (xopt[[2]] - x2)*P[x1, x2, t], {x2, 1}] +
1/2 D[P[x1, x2, t], {x1, 2}] + 1/2 D[P[x1, x2, t], {x2, 2}], 0];
(*numerical solution*)
Psol = NDSolveValue[{fwrdKol, iC, bC},
P, {x1, x2} \[Element] \[CapitalOmega], {t, 0, Tmax}];
(*visualise solution at a t=Tmax/2*)
ContourPlot[Psol[x1, x2, Tmax/2], {x1, x2} \[Element] \[CapitalOmega]]
(*probability mass within domain*)
domP[t_] :=
NIntegrate[
Rationalize[Psol[x1, x2, t],
0], {x1, x2} \[Element] \[CapitalOmega], AccuracyGoal -> 4]
(*visualise*)
Plot[domP[t], {t, 0, 5}, PlotTheme -> "Scientific", PlotRange -> All,
FrameLabel -> {"t", "Prob. Mass Domain"}]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=timevmass.png&userId=3214634
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=simplex.png&userId=3214634Cameron Turner2024-07-11T16:45:27Z[WSS24] PDE coupling in free and porous dual-media flow
https://community.wolfram.com/groups/-/m/t/3210114
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/c2191245-a4b6-4c93-b463-13e3fcf98896Safi Ahmed2024-07-10T02:17:35Z[WSG23] Daily Study Group: Solving ODEs and PDEs
https://community.wolfram.com/groups/-/m/t/2975371
A Wolfram U Daily Study Group on "Solving ODEs and PDEs" begins on Monday, August 8, 2023.
Join me and a cohort of fellow enthusiasts to learn about the techniques for solving ordinary differential equations (ODEs) and partial differential equations (PDEs) using Wolfram Language. Learn how to use the DSolve (for symbolic solutions) and the NDSolve (a general numerical differential equation solver) functions. Topics covered include the numerical method of lines, the finite element method (FEM), the use and construction of meshes, boundary value problems and eigenvalue problems.
Participate in live Q&A and review your understanding through interactive in-session polls. Complete quizzes at the end of the study group to get your certificate of program completion.
August 7-11, 2023, 11am-12pm CT (4-5pm GMT)
> [**REGISTER HERE**][1]
Please feel free to use this thread to collaborate and share ideas, materials and links to other resources with fellow learners.
I look forward to seeing you online!
![enter image description here][2]
[1]: https://www.bigmarker.com/series/daily-study-group-wsg41
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=WolframUBanner.jpeg&userId=20103Luke Titus2023-07-24T18:32:33Z