Questions tagged [discontinuity]

Tag for issues caused by discontinuity (e.g. Boole, Piecewise, UnitStep, If, etc) in arithmetic function.

Filter by
Sorted by
Tagged with
33
votes
3answers
4k views

Plot a piecewise function with black and white disks marking discontinuities

Let's say I'd like to plot Sign[x + 0.5]: Plot[Sign[x + 0.5], {x, -1, 1}] Mathematica will give this: This plot does not ...
11
votes
3answers
3k views

Can NDSolve handle discontinuous data?

Backslide introduced in 9.0, persisting through 11.0.1 It is possible to numerically solve a differential equation if not-smooth data are involved? For example the following instruction return the ...
7
votes
1answer
753 views

Free Convective Heat Transfer of Non-Newtonian Power Law Fluids from a Vertical Plate

I am trying to solve a set of PDEs mentioned in this paper with NDSolve but facing quite a few issues. The PDE system is: ...
11
votes
3answers
761 views

Position of discontinuous coefficient influences the solution of PDE

This issue is raised in the discussion under this post about heat flux continuity and I think it's better to start a new question to state it in a clearer way. Just consider the following example: <...
13
votes
1answer
1k views

NDSolveValue - Heat flux continuity

I'm having some problems with NDSolve and the problem of conduction of heat. Specifically I'm having problems with the continuity of heat flux. First, let me ...
6
votes
4answers
2k views

NDSolve with Piecewise gives the incorrect answer randomly

Bug introduced in 9.0 and fixed in 11.1 NDSolve in Mathematica 9.0.0 (MacOS) is behaving strangely with a piecewise right hand side. The following code (a ...
16
votes
4answers
529 views

How to model diffusion through a membrane?

This is a follow-up on How to handle discontinuity in diffusion coefficient? Consider diffusion of $u(t,x)$ on the domain $x \in [0,2]$ with some simple boundary conditions such as $u(0) = 2, u(2) = ...
12
votes
3answers
830 views

How to set interface conditions for optical waveguide in NDEigensystem?

I have been working on waveguide mode analysis using FEM in Mathematica for a week, but I haven't succeeded until now. The optical fiber-like waveguide is featured with different refractive index in ...
5
votes
1answer
213 views

Discontinuous boundary condition distorts in the numeric solution

Here I want to simulate a physical model that I have used a set of differential equations. My coefficients and parameters: ...
7
votes
1answer
309 views

The rectangular region composed of two triangular regions contains a pde connecting the bc of the first and the second kind

I'm going to solve the Laplacian equation of the electrostatic field, which consists of two triangular regions, a rectangular region, a square, and on the intersection of the two regions of $$y=x$$, ...
7
votes
2answers
314 views

NDSolve with Piecewise solving BVP gives warning bvdisc [duplicate]

Backslide introduced in 9.0, persisting through 11.0.1 I try to solve a boundary value problem of coupled ODEs. For reference, when I solve this set of equations it works without any problems: ...
11
votes
4answers
465 views

3D FEM Vector Potential

I am trying to reproduce an FEM result in a paper. Due to possible copyright I cannot show the result directly but fortunately there is a free link An Incomplete Gauge for 3D Nodal Finite Element ...
8
votes
1answer
367 views

Options of WhenEvent

I'm using NDSolve and WhenEvent to simulate building heating systems and their discontinuous operation. Here is a simplified example. The idea is quite simple. I have the following WhenEvents: <...
6
votes
2answers
222 views

Ndsolve problem with Sign (friction)

In a very simple model I consider the motion of a body with frictional force. ...
5
votes
1answer
193 views

NDSolve with piecewise boundary conditions

I am trying to solve two simultaneous partial differential equation for $P[x,t]$ and $V[x,t]$. I have a piecewise boundary condition for $V[L,t]$. When using that piecewise condition, I get the error ...
4
votes
3answers
260 views

NDSolve will try solving the system as differential-algebraic equations but it didn't get the solution

Please help me deal with this kind of question about ODEs. My codes are as follows ...
8
votes
1answer
195 views

How to handle discontinuity in diffusion coefficient?

I am looking to solve the diffusion equation with a discontinuous jump in the diffusion coefficient. In 1D, the diffusion equation for $u(t,x)$ is: $$ \partial_t u = \partial_x (D \partial_x u), $$ ...
6
votes
2answers
632 views

Solving wave equation with singular initial conditions

I am trying to compute the solution to the wave equation using NDSolveValue and singular initial displacement (continuous, but not differentiable in a point). I ...
5
votes
0answers
83 views

Evaluation of Mod of InterpolatingFunction prevents discontinuity processing by Plot

While trying out @MichaelSeifert's answer to Eliminating Discontinuities When Using Mod with NDSolve and Plot for Oscillators, I came across this odd behavior. Depending on how an ...
2
votes
0answers
60 views

How to express continuity assumption for Integrate?

I am wondering if it is possible, and how if so, to express function continuity in the assumptions for the definite form of Integrate. First of all, while ...
2
votes
1answer
204 views

Piecewise causes ndnum warning in NDSolve

Bug introduced in 8.0.4 or earlier. I try to solve the heat transfer equation with boundary condition that depends on time: ...
2
votes
1answer
88 views

Eliminating Discontinuities When Using Mod with NDSolve and Plot for Oscillators

I have found similar questions to mine, but dealing with piecewise and parametric plots instead and unfortunately the answers don't seem to extend to my case. I have a solution from ...
1
vote
1answer
194 views

Repeated convergence test failure and why?

i have assigned all the values and the ODE assigned is as this ...