FEATool  v1.6
Finite Element Analysis Toolbox
 All Files Functions Pages
ex_nonlinear_pde2.m File Reference

Description

EX_NONLINEAR_PDE2 2D nonlinear PDE example.

[ FEA, OUT ] = EX_NONLINEAR_PDE2( VARARGIN ) Solves (x*u*u_x)_x + uy_y = 0 with Dirichlet boundary conditions u(x=x1)=u1 and u(x=x2)=u2. Compares against the analytical solution u(x) = sqrt(2*c1*log(x)+2*c2), with c1 = -(u1^2-u2^2)/ (log(x2)-log(x1))/2 and c2 = (log(x2)*u1^2-u2^2*log(x1))/(log(x2)-log(x1))/2. Accepts the following property/value pairs.

Input       Value/{Default}        Description
-----------------------------------------------------------------------------------
hmax        scalar {1/10}          Grid cell size
sfun        string {sflag1}        Finite element shape function
u1          scalar                 Dirichlet boundary value at x = x1
u2          scalar                 Dirichlet boundary value at x = x2
x1          scalar                 Left most domain x-coordinate
x2          scalar                 Right most domain x-coordinate
ischeme     scalar {-1}            Solver scheme (<0 = stationary)
iplot       scalar 0/{1}           Plot solution (=1)
                                                                                  .
Output      Value/(Size)           Description
-----------------------------------------------------------------------------------
fea         struct                 Problem definition struct
out         struct                 Output stuct
Generated fields of fea:
Generated fields of out: