2D Transient Heat Conduction with neumann condition

22 次查看(过去 30 天)
Hi All,
I had been having trouble on doing the matlab code on 2D Transient Heat conduction with Neumann Condition. I do not know how to specify the Neumann Boundary Condition onto matlab. For example, Du/Dt = 5.
Any help would be appreciated as currently, there are no one helping and I cant find any related source regarding to Neumann on matlab.
Thank you for any help! :)

采纳的回答

Mohammad Abouali
Mohammad Abouali 2014-12-16
Are you using MATLABs PDE solver? or do you have a special code for yourself.
How you impose a boundary condition is highly depending on the "discretization scheme" in use and what approach you are using to solve the system. There is no unique solution to it.
  3 个评论
Torsten
Torsten 2014-12-17
I assume that you mean du/dx = 5 instead of Du/Dt = 5 in your message.
Let's assume your boundaries are parallel to the coordinate axis.
Let's further assume the boundary is at x=constant.
Then you can approximate the x-derivative du/dx of the solution as
5 = du/dx at x=constant ~ (u(x)-u(x-deltax))/deltax,
thus
u(x)= u(x-deltax) + 5*deltax (right boundary)
u(x-deltax)=u(x)-5*deltax (left boundary)
So for this simple approximation for du/dx the Neumann condition gives you an explicit equation for your solution at the boundary, namely u(x) at the right boundary and u(x-deltax) at the left boundary.
Best wishes
Torsten.
Mohammad Abouali
Mohammad Abouali 2014-12-18
Let's say U or heat variable is stored at the cell center. so if the length of one cell is 1 unit, then the leftmost cell has it's boundary at 0 and 1 and U is defined at the center of that cell or 0.5.
Now you have Du/Dx at x=0 equals to V=5; Now let's say you are estimating the derivatives with a linear interpolation, (in this case second order accurate).
If U at x=0.5 is called U1 and U at x=-0.5 is called U0 then dU/dx at x=0 is defined as:
(U1-U0)/dx=v
then U0=U1-dx*v
Note that U1 which is inside the boundary to be calculated by your main equation. And U0 which is outside the real boundary and is called Ghost or dummy nodes to be set by the boundary condition.
Later for x=0.5 you have the diffusion equation or
dU/dt=K d^2U/dx^2
discretizing the right hand side:
d^2U/dx^2 ==> (U0-2*U1+U2)/dx^2
Makes use of U0 which its value was set by BC Equation.
However, this is one method of applying the BC. Depending on your scheme and grid in use, you can have different approach.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 1-D Partial Differential Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by