Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
15k views

Python Finite Difference Schemes for 1D Heat Equation: How to express for loop using numpy expression

Hello all, I've recently been introduced to Python and Numpy, and am still a beginner in applying it for numerical methods. I've been performing simple 1D diffusion computations. I suppose my ...
Leonardo Parra García's user avatar
2 votes
1 answer
411 views

Where am I making a mistake in solving the heat equation using the spectral method (Chebyshev's differentiation matrix)?

I would like to numerically solve the following heat equation problem: $$ u_t = \Bigg(2{a \over l}\Bigg)^2 u_{xx} \tag 1$$ $$ x \in [ -1, 1 ] \tag 2$$ $$ u(x, 0) = 0 \tag 3$$ $$ u(1, t) = A \sin \Bigg(...
FriendlyNeighborhoodEngineer's user avatar
1 vote
1 answer
1k views

Flux boundary condition in solute transport

I have a pretty naive question, though important to me. Usually when solving the following PDE in solute transport: $\frac{{\partial C}}{\partial t } = \nabla. (D\nabla C -vC )=0,$ one can be asked to ...
Daniel's user avatar
  • 109
1 vote
1 answer
2k views

How to solve heat equation in spherical coordinates with finite differences?

I have a problem dealing with heat transfer which is spherically symmetrical. I was thinking it should be possible to solve this as a 1d problem in spherical coordinates using the radius only. ...
Alex I's user avatar
  • 111