Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Numerical Computation sorted by active[WSS22] Fluid flow analysis through squared arrangements of pipes
https://community.wolfram.com/groups/-/m/t/2575644
![enter image description here][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=lead_image_fluid_flow.jpg&userId=20103
[2]: https://www.wolframcloud.com/obj/1cec72d2-dca2-4a8d-bfd0-7ea394212bcbGiuseppe Parasiliti Rantone2022-07-19T22:54:06ZHow to use NDsolve properly for a system of 2 equations and 2 variables
https://community.wolfram.com/groups/-/m/t/2716191
Hi,
I'm trying to solve a system of 2 equations and 2 variables by using NDsolve function.
However, the result is not what I expect. I would like to know if I use the function correctly.
This is my first question, I hope this is relevant.
f1[theta1_, theta2_, v1_,
v2_] := ((2 + m)*omega^2 * Sin[theta1] +
m*omega^2 * Sin[theta1 - 2*theta2] +
2*m*(l *v2^2 + v1^2 * Cos[theta1 - theta2]) Sin[
theta1 - theta2])/ (m * Cos[2*theta1 - 2*theta2] - 2 - m);
f2[theta1_, theta2_, v1_,
v2_] := (2*((1 + m) * (v1^2 + omega^2 * Cos[theta1]) +
l*m*v2^2 * Cos[theta1 - theta2])*
Sin[theta1 - theta2]) / (-l*(m * Cos[2*theta1 - 2*theta2]) - 2 -
m);
m1 = 0.5;
m2 = 2;
l1 = 0.6;
l2 = 0.9;
omega=0.5;
solNl = NDSolve[{
th3''[s] == f1[th3[s], th4[s], th3'[s], th4'[s]],
th4''[s] == f2[th3[s], th4[s], th3'[s], th4'[s]],
th3[0] == 0.6,
th4[0] == 0.6,
th3'[0] == 0,
th4'[0] == 0}, {th3, th4}, {s, 0, 30 Pi}];
Sol3[t_] := th3[t] /. solNl;
Sol3[8 Pi]
As result I got
NDSolve::ndsz: At s == 24.140269374312506`, step size is effectively zero; singularity or stiff system suspected.
InterpolatingFunction::dmval: Input value {8 \[Pi]} lies outside the range of data in the interpolating function. Extrapolation will be used.
{3.72634*10^49}
Any help will be appreciated.Isaac Keith2022-12-05T02:21:11ZRomeo, Juliet and Rosaline love affair model
https://community.wolfram.com/groups/-/m/t/2714442
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/306967f7-2744-4354-bdcf-cfeba8e13dedSangdon Lee2022-12-02T16:47:40ZProblem initial/boundary condition for diffusion in Lagrangian coordinates
https://community.wolfram.com/groups/-/m/t/2714274
Dear community,
I am having trouble in solving a non-linear, coupled system of equations to describe diffusion-controlled bubble growth in a viscoelastic medium.
The problem is described in detail https://pubs.acs.org/doi/abs/10.1021/ie060295a .
The equation I am trying to solve in time domain (t={0,0.01}) is:
![enter image description here][1]
Where c'=c-c0, D is the diffusion coefficient and R is the bubble radius.
The initial and boundary conditions are:
![enter image description here][2]
![enter image description here][3]
Where Kh is a constant, Pg is a pressure computed from the momentum balance, Pg0 is the initial pressure in the bubble (constant) and S is the radius of the bubble shell.
My way of solving it using NDsolve and implicit Runge Kutta method looks like the following:
CR=Kh*P;
CR0=Kh*P0
R=10^-6;
Rshell=20*10^-6;
concprof = NDSolve[{D[conc[y, t], t] == 9*Diff*D[(y + R^3)^(4/3)*D[conc[y, t], y], y],
conc[y, 0] == 0,
(conc[0, t] /. t ->0.01) == CR-C0,
Derivative[1, 0][conc][(Rshell^3 - R^3), t] == 0},
conc,
{y, 0, (Rshell^3 - R^3)},
{t,0, 0.01},
Method -> "ImplicitRungeKutta"]
If doing so, I get "Boundary condition conc[0,0.01]==-0.0222257 is not specified on a
single edge of the boundary of the computational domain."
If I try in alternative:
concprof = NDSolve[{D[conc[y, t], t] == 9*Diff*D[(y + R^3)^(4/3)*D[conc[y, t], y], y],
conc[y, 0] == 0,
conc[0, t]== CR-C0,
Derivative[1, 0][conc][(Rshell^3 - R^3), t] == 0},
conc,
{y, 0, (Rshell^3 - R^3)},
{t,0, 0.01},
Method -> "ImplicitRungeKutta"]
I get NDSolve::ibcinc: Warning: boundary and initial conditions are inconsistent.
Can someone help me understand what I am doing wrong?
Thanks!
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Arafmanesh.PNG&userId=2714242
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=BC1.PNG&userId=2714242
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=IC.PNG&userId=2714242Enrico Troisi2022-12-02T10:26:44ZExact solutions to rigid body motion: application to detumbling satellites
https://community.wolfram.com/groups/-/m/t/2701672
![enter image description here][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Rigidbodyequations.gif&userId=20103
[2]: https://www.wolframcloud.com/obj/b89c5dbf-26ae-4efe-a7fe-3f057980de7aChristian Peterson2022-11-15T18:06:17Z