rbmatlab 0.10.01
Functions
models/inspiration/praktikum_poisson_model.m File Reference

small example of a model, i.e. a structure describing the data functions and geometry information of a general elliptic equation consisting of diffusion, convection, reaction equation: More...

Go to the source code of this file.

Functions

function model praktikum_poisson_model ( params)
 small example of a model, i.e. a structure describing the data functions and geometry information of a general elliptic equation consisting of diffusion, convection, reaction equation:
function res praktikumpoissonmodel>all_dirichlet_boundary_type ( glob, params)
function res praktikumpoissonmodel>mixed_boundary_type ( glob, params)
function res praktikumpoissonmodel>my_normals ( glob, params)

Detailed Description

small example of a model, i.e. a structure describing the data functions and geometry information of a general elliptic equation consisting of diffusion, convection, reaction equation:

Definition in file praktikum_poisson_model.m.


Function Documentation

function model = praktikum_poisson_model (   params)

small example of a model, i.e. a structure describing the data functions and geometry information of a general elliptic equation consisting of diffusion, convection, reaction equation:

  • div ( a(x) grad u(x)) + div (b(x) u(x)) + c(x) u(x) = f(x) on Omega u(x)) = g_D(x) on Gamma_D a(x) grad u(x)) = g_N(x) on Gamma_N

Here, we denote the functions as u: solution (if known, useful for validation purpose) f: source a: diffusivity b: velocity c: reaction g_D: Dirichlet boundary values g_N: Neumann boundary values

Each function allows the evaluation in many points simultaneuously by

model.source(glob) or model.source(glob,params)

where glob is a n times 2 matrix of row-wise points. The result is a n times 1 vector of resulting values of f.

additionally, the model has a function, which determines, whether

a point lies on a Dirichlet or Neumann boundary

model.boundary_type(glob) 0 no boundary (inner edge or point) -1 indicates Dirichlet-boundary -2 indicates Neumann-boundary

The data functions given in this model are the simple poisson equation with Gamma_D = boundary(Omega), Gamma_N = {}

-div (grad u) = f u = 0 on Gamma_D

with exact solution u(x) = x_1(1-x_1)x_2(1-x_2), i.e. f(x) = 2 (x_1 + x_2 - x_1^2 - x_2^2)

params is an optional parameter, perhaps useful later

Parameters:
paramsparams
Return values:
modelmodel
Required fields of params:
  • all_dirichlet_boundary —  all dirichlet boundary
Generated fields of model:
  • solution —  solution
  • solution_gradient —  solution gradient
  • source —  source
  • reaction —  reaction
  • velocity —  velocity
  • diffusivity —  diffusivity
  • diffusivity_gradient —  diffusivity gradient
  • boundary_type —  boundary type
  • dirichlet_values —  dirichlet values
  • normals —  normals
  • neumann_values —  neumann values

Definition at line 1 of file praktikum_poisson_model.m.

 All Classes Namespaces Files Functions Variables