# Solving second order non-linear partial differential in three independent variables

5 views (last 30 days)
Mahesh Nallamothu on 19 Apr 2022
Commented: Mahesh Nallamothu on 21 Apr 2022
Temperature(T) is function of r, teta, z (cylindrical coordinates)
V1(r)*(1/r)* + V2(r)* = a* ( (1/r)* + )
where
a is constant
V1 and V2 are function of r
can we solve this differential equation in matlab

William Rose on 19 Apr 2022
Edited: William Rose on 19 Apr 2022
@Mahesh Nallamothu, Yes you can.
Matlab's PDE toolbox is very powerful. You will have to invest some effort to master its powers.
If you do not have access to the PDE toolbox, or you do not have time to learn it, you can solve your PDE directly. Write the discretized version of the PDEs, i.e. the difference equations. Initialize the array elements that correspond to the boundary conditions. Then update other elements, using the difference equations.
See the answer I posted here, to a similar question.
I notice that your equations do not involve time. Therefore I assume you are trying to fnd a steady state solution that is consistent with V1(r) and V2(r). Can you give an example of what V1(r) and V2(r) might be?
It may be necessary to solve this by a relaxation method. In this approach, you create a 4-dimensional array, where the 4th dimension is for time. You write the difference equations for the PDE for heat diffusion. You initialize the system with some arbitrary distribution of temperature that is consistent with V1 and V2 but probably not consitent with the PDEs you gave. Then you enforce the conditions on V1 and V2 and choose a small time step size. (The time step, delta T, will have to be determined by trial and error. If delta T is not small enough, you will get oscillations. If it is too large, you will need to take many steps before the system reaches equilibrium.) You apply the difference equaitons at each new time step. Let the system evovle over time until it steops changing significantly.
Good luck!
Mahesh Nallamothu on 20 Apr 2022
In the file relaxation method pdf, we can use that if it is unsteady state but our case it is steady state
V1 and V2 equations are attached please refer the attached pdf

William Rose on 20 Apr 2022
@Mahesh Nallamothu,
An analytical solution exists: Consider a solution which is independent of z and θ . In other words, T(r) is the same for all values of z and for all values of θ . Then . Then the differential equation simplifies to . Then we remember the derivative of natural log, from calculus class a million years ago (it seems). We observe that is a solution to the diferential equation. k1 and k2 can be chosen to meet boundary conditions at the inner and outer radii. I assume the volume of interest is an annular cylinder, because several terms in the equations diverge at r=0.
Mahesh Nallamothu on 20 Apr 2022
we have already done by assuming = 0 and now we are trying out by increasing complexity. so, cannot be assumed to be zero
So to solve this we need a best sutible matlab code or numerical method

Torsten on 20 Apr 2022
Interpret teta as time.
Discretize the dT/dz, 1/r*d/dr(r*dT/dr) expressions in space.
You'll arrive at a system of ordinary differential equations of the form
dT/dteta = A(r,z)*T + b(r,z)
Advance the solution in time e.g. using the Crank-Nicolson method.
If it's difficult to program this on your own, maybe a google search for
"instationary Laplace equation in cylindrical coordinates & matlab"
might help.