Undergraduate students are often exposed to various numerical methods for solving partial differential equations. For example, in a sophomore engineering heat-transfer course, the finite-difference method is introduced to solve steady-state heat conduction problems, in which the computational domain conforms to one of the traditional orthogonal coordinate systems (i.e., rectangular, cylindrical, or spherical). In this Demonstration, we consider a 2D steady-state heat conduction problem in a physical domain based on a nonstandard orthogonal coordinate system:
We show how this problem can be solved using a traditional central-difference method with boundary-fitted coordinates.
The steady-state temperature distribution in the cavity is described by the following boundary-value problem (BVP) with four boundary conditions (BC1–BC4):

,
The upper boundary

is specified as an arc of a circle, given by

, and has unit normal

,

.
It is desirable to make the BVP dimensionless before attempting to solve it numerically. We introduce the following dimensionless variables:
The dimensionless form of the equations becomes:

,
where

is the Biot number.
The interface equation becomes:

.
For notational convenience, we suppress the hat (

) notation and use the above formulation in what follows.
Boundary-Fitted Coordinates The physical domain is defined by the coordinates

and

.
We now suppose that we have the following mapping that maps the physical domain

into a unit square in the computational domain:

,

,
Thus the dimensionless temperature profile in the computational domain is defined by the mapping:

. We can use the chain rule for differentiation to determine the explicit form for the Laplacian

in the transformed coordinates (ξ, η).

.
Clearly when

s uniform (flat) then

and we get:

,
which is the Laplacian in rectangular coordinates with

scaled with the height

.
Finite Difference Solution To generate our finite-difference formula, we use the following grid template:
and use central differences for all derivatives. Thus at node

, we have the following approximation for the function

:

,

,

,

.
Thus the discretized version of the Laplacian of ψ at an interior node 0 is given by

,
where the coefficients

are given by

,

,

,

.
Once the grid is specified, then the coefficients

can be computed at the given node, for a given

.
Boundary Conditions at the Interface At the interface, the heat flux is given by

at

.
We will use a central-difference scheme for this BC:

and

,
which introduces a fictitious node

that lies outside the domain:

,

and

.
Solving for the fictitious node, we get

.
[1] C. Chen and J. M. Floryan, "Numerical Simulation of Nonisothermal Capillary Interfaces,"
Journal of Computational Physics,
111(1), 1994 pp. 183–193.
doi:10.1006/jcph.1994.1053.