I want to model 1-D heat transfer equation with $ \ k=0.001 \ $ in Matlab, at left side there is a Neumann boundary condition $ \ \frac{dT}{dx}=0 \ $ and at the right side, there is a Dirichlet boundary condition $ \ T=0 \ $ and my initial condition is $ \ T(0,x)=-20 \ $ degree centigrade. As I am a beginner in Matlab anybody can help in this regard. I will be very thankful to you?

  • 1
    $\begingroup$ There are two separate parts to this: making pseudocode and making Matlab code. This SE is good for the former and bad for the latter. But to get help with the former, you should give some attempt, such as, at the very least, defining what algorithm you want to implement. $\endgroup$
    – Ian
    Aug 20, 2018 at 23:04
  • $\begingroup$ I want to solve it via finite difference method as in code I want to define grid and grid points and apply the all conditions. $\endgroup$ Aug 20, 2018 at 23:08
  • $\begingroup$ I have tried my best.. but all in vain :( $\endgroup$ Aug 20, 2018 at 23:09
  • $\begingroup$ @FahadPervaiz The first step is to write the numerical method such as this explicit forward finite-difference method, by taking care of the boundary conditions. The second step consists in Matlab coding, which is introduced here and here. Please show your trials. $\endgroup$
    – EditPiAf
    Aug 22, 2018 at 8:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.