﻿ Sample Problems > Usage > 1D > 1d_cylinder

# 1d_cylinder

Navigation:  Sample Problems > Usage > 1D >

# 1d_cylinder   { 1D_CYLINDER.PDE

This problem tests the implementation of 1D cylindrical coordinates in FlexPDE.

A distributed source is applied to a heatflow equation.  The source is chosen as

the analytic derivative of an assumed Gaussian solution.  The numerical solution

is then compared to the analytical solution.

}

title '1D Cylinder Test -- Gaussian'

coordinates

cylinder1   { default coordinate name is 'R' }

variables

u

definitions

k = 1

w=0.1

{ assume a gaussian solution }

u0 = exp(-r^2/w^2)

{ apply the correct analytic source for cylindrical geometry (we could use

div(k*grad(u0)) here, but that would not test the 1D Cylinder expansions) }

s = -(4/w^2)*(r^2/w^2-1)*u0

left=point(0)

right=point(1/10)

equations

boundaries

region 1

start   left   point value(u)=u0

monitors

elevation(u) from left to right

plots

elevation(u,u0) from left to right

elevation(u-u0) from left to right as "Error"