Home > demos > vkplate > vkinit.m

vkinit

PURPOSE ^

von karman init-routine, partially clamped plate

SYNOPSIS ^

function p=vkinit(p)

DESCRIPTION ^

 von karman init-routine, partially clamped plate

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function p=vkinit(p) 
0002 % von karman init-routine, partially clamped plate
0003 p=stanparam(p); p.pstyle=1; p.cm=cool; 
0004 p.neq=10; p.f=@vkf; p.jac=@vkjac; p.outfu=@stanbra; 
0005 ly=pi/2; lx=1.6*ly; p.tol=1e-6; p.geo=rec(lx,ly); 
0006 sc=10^3; zv=zeros(p.neq,1); % define BC:
0007 % III(u), I(v), on x=0,1, uyy=0; (vert. boundaries)
0008 % III(u), I(v), on y=0,1, uxx=0; (horiz. boundaries)
0009 qdv=[0 0 sc sc 0 sc 0 sc sc 0]; 
0010 qdh=[sc sc sc sc sc sc 0 sc sc 0]; 
0011 % force u=0 on vertical boundaries
0012 qmv=diag(qdv,0); qmh=diag(qdh,0); qmv(2,1)=sc; 
0013 % ordering of boundaries: bottom, right, top, left
0014 p.bc=gnbc(10,qmh,zv,qmv,zv,qmh,zv,qmv,zv);
0015 p.bcf=@(p,u,lam) p.bc; nx=25;ny=round(nx*ly/lx);p=stanmesh(p,nx,ny); 
0016 p=setbmesh(p); pre=sprintf('%s',inputname(1)); p=setfn(p,pre);
0017 p.dsmin=0.001; p.dsmax=5; p.dlammax=1; p.nsteps=10; p.lammax=100; 
0018 p.nsw=0; p.vsw=2; p.amod=0; p.bifchecksw=1; p.spcalcsw=1; % 0/1
0019 p.pcmp=1; p.imax=10; p.bpcmp=2; p.smod=10;
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% starting point %%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 p.lam=5; p.ds=0.1; p.xi=1/p.np;
0022 u=zeros(1,p.np); u0=[u u u u u u u u u u]; p.u=reshape(u0,p.neq*p.np,1); 
0023 plotsol(p,1,1,p.pstyle); p.tau=zeros(p.neq*p.np+1,1); p.tau(1)=1; 
0024

Generated on Wed 15-Aug-2012 12:53:02 by m2html © 2005