Documents |
|
There are awnsering for some common questions:
Q1. How to write a Maple worksheet ?There are some examples of Maple worksheet that included in the distribution package. Those can be used as a template for new problems. In this document we will show steps to create a simple worksheet. The problem is going to simulated here is a diffusion problem of a scalar \theta. u=... In order to solve this equation you can do the following steps:
|
> | restart; read(femLego); |
> | # diffusion equation teq:=ElementInt(phi(x,y,z)*(theta[1](x,y,z)-theta[0](x,y,z))/dt ) = -1/Pe*ElementInt(nab(phi(x,y,z))[n] &t nab(theta[1](x,y,z))[n]); |
> | eq_list := [teq]: unknown_list := [theta[1](x,y,z)]: old_unknown_list := [theta[0](x,y,z)]: params_list := [Pe]: |
> | mkDirBC([],unknown_list,old_unknown_list, params_list,`3DP1_tetra_bsf`); |
adddbc.f
SPdirb
> | # Get files to read input from meshfile.gambit and indata files # An indata_sample will be created with the coresponding input parameters GambitTetraInput(params_list); |
rdinpt.c
rdpara.c
indata_sample
> | # Variables that do not enter in lhs of an ic_eqlst are given the intial value 0: ic_eqlst:=[]: mkICcopy(ic_eqlst, unknown_list, params_list,`3DP1_tetra_bsf`); |
ic_init
> | # Specify the output variables and set name for them |
> | plotlist:=[theta[1](x,y,z)]: menulist:=[theta]: OpenDXPlotP1(plotlist,menulist,unknown_list,params_list,tetrahedra); |
wroutp();
outputresults();
> | # set up different solvers to use with different equations: solve_list:=[gmres]: mkSolve(solve_list,eq_list); |
solve.c;
> | # create residual computations etc. size_parameters:=mkFem(eq_list, unknown_list, old_unknown_list, params_list, phi(x,y,z), `3DP1_tetra_bsf`); |
mkresi
amedsp
adidsp
addr1
addm1
grbcrs
bdebsp
addini
include/size.h
include/csize.h
changing jacobians list:
true
size_parameters := [1,4,3]
> | # redo only boundary integrals if desired; size_parameters:=mkBCInt(eq_list, unknown_list, old_unknown_list, params_list, phi(x,y,z), `3DP1_tetra_bsf`); |
adbr1
adbm1
grbcrs
bdedsp
size_parameters := 3
![]() ![]() ![]() ![]() ![]() ![]() ![]() |