• Keine Ergebnisse gefunden

The Nagumo Equation with Comsol Multiphysics

N/A
N/A
Protected

Academic year: 2022

Aktie "The Nagumo Equation with Comsol Multiphysics"

Copied!
7
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

The Nagumo Equation with Comsol Multiphysics

Denny Otten1 Christian Döding2 Department of Mathematics Bielefeld University

33501 Bielefeld Germany

Date: 25. April 2016

1. Traveling Front in the Nagumo equation

Consider theNagumo equation

ut=uxx+u(1−u)(u−b), x∈R, t>0

for0< b <1, whereu=u(x, t)∈R. We want to solve this equation numerically for a suitable initial value function u0 with Comsol Multiphysics. Therefore, we have to restrict the equation on a sufficiently large bounded domainΩ⊂Rwith homogeneous Neumann boundary conditions, i.e. we solve the initial boundary value problem

(1.1)

ut=uxx+u(1−u)(u−b) , x∈Ω, t∈(0, T], u(·,0) =u0 , x∈Ω, t¯ = 0,

ux= 0 , x∈∂Ω, t∈[0, T],

on the spatial domainΩ = (−50,50)for end timeT = 100, initial data

u0(x) = 1 1 + exp(−x

2), x∈R

and parameterb= 14. For the space discretization we use linear Lagrange elements with maximal element size△x= 0.1. For the time discretization we use the BDF method of maximum order2 with intermediate time steps, time stepsize△t= 0.1, relative tolerancertol = 103 and absolute toleranceatol = 104with global method set to be unscaled. The nonlinear equations should be solved by the Newton method. i.e. automatic (Newton).

1e-mail:dotten@math.uni-bielefeld.de, phone:+49 (0)521 106 4784,

fax:+49 (0)521 106 6498, homepage:http://www.math.uni-bielefeld.de/~dotten/.

2e-mail:cdoeding@math.uni-bielefeld.de, phone:+49 (0)521 106 4765 1

(2)

2. Model Wizard

Start Comsol Multiphysics.

To start Comsol Multiphysics 5.2 open theTerminaland enter

• comsol -ckl Model Wizard.

Space dimension

• In theNewwindow, clickModel Wizard.

• In theModel Wizardwindow, click1Din theSelect Space Dimensionmenu.

Equation

• In the Select Physics tree, select Mathematics>PDE Interfaces>Coefficient Form PDE (c).

• ClickAdd.

• Next, locate theDependent Variablessection.

• In theField name text field, typeu.

• In theDependent variablestext field, type alsou.

Study settings

• ClickStudyand choosePreset Studies>Time Dependent.

• ClickDone.

Some Advanced Settings.

Hint: In theModel Builderwindow you should click on the Showicon and enable everything that is possible from the menu: Equation Sections (Equation View, Override and Con- tribution,Discretization,Stabilization, Advanced Physics Options,Advanced Study Optionsand Advanced Results Options). Done this, clickExpand Allicon.

3. Geometry

• In theModel Buildertree, expand theComponent 1 (comp1)node, right-clickGeometry 1and selectInterval.

• In theSettingswindow for Interval, locate theInterval section.

• In theLeft endpointtext field, type-50.

• In theRight endpointtext field, type50.

• In theModel Buildertree, right-click on theComponent 1(comp1)→Geometry 1node and selectBuild all. (Alternatively, press the short cutF8.)

4. Partial differential equation

General Settings.

• Click onComponent 1 (comp1)→Coefficient Form PDE(c).

• Locate theSettingswindow for Coefficient Form PDE.

• In theLabeltext field, type Nagumo Equation.

• In theDiscretizationsection choose – Shape function type:Lagrange, – Element order:Linear.

(3)

Partial differential equation. We define the PDE:

• Switch toComponent 1 (comp1)→Nagumo Equation(c)→Coefficient Form PDE 1 ea

2u

∂t2 +da

∂u

∂t +∇ ·(−c∇u−αu+γ) +β· ∇u+au=f with∇= ∂x , and enter the following values

– Mass Coefficient ea:0,

– Damping or Mass Coefficient da:1, – Diffusion coefficient c:1,

– Conservative Flux Convection Coefficientα:0, – Conservative Flux Sourceγ:0,

– Convection Coefficient β:0, – Absorption Coefficienta:0, – Source Term f:fu.

Boundary Conditions. Since the PDE requires homogeneous Neumann boundary conditions at both end points of the interval, we do not must change anything. Hint: By default, there is implemented a zero flux boundary condition on the whole boundary, that corresponds to a homogeneous Neumann boundary condition.

Initial Values. We define the initial valueu(·,0) =u0 for the partial differential equation:

• Click onComponent 1 (comp1)→Nagumo Equation(c)→Initial Values 1.

• In theInitial Valuessection enter – Initial value for u:u0,

– Initial time derivative of u:0.

The quantity u0 will be defined below in Section 5. This completes the implementation of the initial boundary value problem.

5. Parameters and Variables

Parameters. We first define the parameters and constants arising in our model as ’global pa- rameters’:

• In theModel Buildertree, right-click on theGlobal Definitionsnode and selectParame- ters. (Alternatively: On theModeltoolbar, clickParameters.)

• In theSettingswindow for Parameters, locate the Parameters section.

• In the table add the following entry:

Name Expression Value Description

b 1/4 0.25 constant of Nagumo equation

T 100 100 end time

Variables 1. We now define all functions which appear in our model as ’local variables’.

• In theModel Builder tree, right-click on theComponent 1 (comp1)→Definitionsnode and selectVariables.

• In theSettingswindow for Variables, locate theVariablessection.

• In the table add the following entries:

Name Expression Unit Description

u0 1/(1+exp(-x/sqrt(2))) initial value

fu u*(1-u)*(u-b) nonlinearity

(4)

6. Mesh

• In theModel Buildertree, click onComponent 1 (comp1)→Mesh 1.

• In theSettingswindow for Mesh, locate the Mesh Settingssection.

• Set theSequence typeonUser-controlled mesh.

• In theModel Buildertree, switch toComponent 1 (comp1)→Mesh 1→Size.

• In theSettingswindow for Size, locate the Element Size Parameterssection.

• In theMaximum element sizetext field, type0.1.

• In theModel Buildertree, right-click onComponent 1(comp1)→Meshand selectBuild All.

7. Studies and Computation

Study 1. Study 1

• Click onStudy 1.

• Locate theSettingswindow for Study.

• In theLabeltext field, type Study 1: Nagumo Equation.

Step 1

• Click onStudy 1: Nagumo Equation→Step 1: Time Dependent.

• Locate theSettingswindow for Time Dependent.

• In theStudy Settingssection enter – Time unit: s,

– Times:range(0,0.1,T), – Relative tolerance:0.001.

The last input requires to enable the corresponding checkbox.

Solver Configurations

• Right-click on Study 1: Nagumo Equation→Solver Configurations and select Show Default Solver.

• Click onStudy 1: Nagumo Equation→Solver Configurations→Solution 1(sol1)→Time- Dependent Solver 1.

• Locate theSettingswindow for Time Dependent Solver.

• In theAbsolute Tolerancesection enter – Global method:Unscaled,

– Tolerance:0.0001.

• In theTime Steppingsection enter – Method:BDF,

– Steps taken by solver:intermediate, – Maximum BDF order:2.

• Click onStudy 1: Nagumo Equation→Solver Configurations→Solution 1(sol1)→Time- Dependent Solver 1→Fully Coupled 1.

• Locate theSettingswindow for Fully Coupled.

• In theMethod and Terminationsection, choose – Nonlinear Method:Automatic (Newton),

(5)

Solution Store

• Right-click onStudy 1: Nagumo Equation→Solver Configurations→Solution 1(sol1) and selectOther>Solution Storefrom the list.

• Click onStudy 1: Nagumo Equation→Solver Configurations→Solution 1(sol1)→Solution Store 1(sol2).

• Locate theSettingswindow for Solution Store.

• In theLabeltext field, type Nagumo Equation Solution.

7.1. Computation.

• Right-click onStudy 1: Nagumo Equationand selectComputefrom the list.

8. Postprocessing and graphical output

In this section we generate 2 Plot groups and a movie for visualizing our results.

8.1. Results for the Nagumo equation.

Plot Group 1: Traveling Front, View 1

• Click onResults→1D Plot Group 1. Hint: If1D Plot Group 1does not exists, right-click onResultsand select1D Plot Group from the list.

• Locate theSettingswindow for 1D Plot Group.

• In theLabeltext field, type Traveling Front, View 1.

• In the Data section select Data set Study 1: Nagumo Equation/Nagumo Equation Solution (sol2),Time selectionInterpolatedandTimes (s)0 20 40 60 80 100.

• In theTitlesection selectTitle typeNone.

• In thePlot Settingssection selectx-axis labelxandy-axis labelu(x,t).

• Click onResults→Traveling Front, View 1→Line Graph 1. Hint: If Line Graph 1does not exists, right-click onResults→Traveling Front, View 1 and selectLine Graphfrom the list.

• Locate theSettingswindow for Line Graph 1.

• In theDatasection selectData setFrom parent.

• In theSelectionsection selectSelectionAll domains.

• In they-Axis Data section selectExpressionu.

• In thex-Axis Data section selectParameters ExpressionandExpressionx.

• In the Coloring and Style section select Line Solid, Color Cycle and Width 2 in the Line stylesubsection.

• In the Legendssection enable the Show legends checkbox, select Legends Manual and enter the legendst=0,t=20,t=40,t=60,t=80 andt=100.

Plot Group 2: Traveling Front, View 2

• Click onResults→1D Plot Group 2. Hint: If1D Plot Group 2does not exists, right-click onResultsand select1D Plot Group from the list.

• Locate theSettingswindow for 1D Plot Group.

• In theLabeltext field, type Traveling Front, View 2.

• In the Data section select Data set Study 1: Nagumo Equation/Nagumo Equation Solution (sol2)andTime selection All.

(6)

• In theTitlesection selectTitle typeNone.

• In thePlot Settingssection selectx-axis labelxandy-axis labelt.

• Click onResults→Traveling Front, View 2→Line Graph 1. Hint: If Line Graph 1does not exists, right-click onResults→Traveling Front, View 2 and selectLine Graphfrom the list.

• Locate theSettingswindow for Line Graph 1.

• In theDatasection selectData setFrom parent.

• In theSelectionsection selectSelectionAll domains.

• In they-Axis Data section selectExpressiont.

• In thex-Axis Data section selectParameterExpressionandExpressionx.

• Right-click onResults→Traveling Front, View 2→Line Graph 1and select Color Ex- pression.

• Click onResults→Traveling Front, View 2→Line Graph 1→Color Expression 1.

• Locate theSettingswindow for Color Expression.

• In theExpressionsection selectExpressionu.

Plot Group 3: Plot for Animation

• Right-click onResultsand select1D Plot Groupfrom the list.

• Locate theSettingswindow for 1D Plot Group 3.

• In theLabeltext field, type Plot Group for Animation.

• In the Data section select Data set Study 1: Nagumo Equation/Nagumo Equation Solution (sol2),Time selectionFirst.

• In theTitlesection selectTitle typeNone.

• In thePlot Settingssection selectx-axis labelxandy-axis labelu(x,t).

• Click onResults→Plot Group for Animation→Line Graph 1. Hint: If Line Graph 1 does not exists, right-click onResults→Plot Group for Animationand selectLine Graph from the list.

• Locate theSettingswindow for Line Graph 1.

• In theDatasection selectData setFrom parent.

• In theSelectionsection selectSelectionAll domains.

• In they-Axis Data section selectExpressionu.

• In thex-Axis Data section selectParameters ExpressionandExpressionx.

• In the Coloring and Style section select Line Solid, Color Cycle and Width 2 in the Line stylesubsection.

• In theLegendssection enable theShow legendscheckbox, selectLegendsAutomatic.

Animation 1: Traveling Front, Animation

• Click on theAnimationicon on top of theSettingswindow and selectPlayer.

• Locate theSettingwindow for Animation 1.

• In theLabeltext field, type Traveling Front, Animation.

• In theTargetsection selectFile.

• In theOutputsection selectFormatGIFand in theFilenametext field type NagumoEquation.gif.

(7)

• In theFramessection enterNumber of Frames100.

• In the Layout section enable the checkbox for Include and then the checkboxes for Title, LegendandAxesand enterFont size10.

• In theAdvancedsection disable the checkboxSynchronize scales between frames.

• Right-clickResults→Export→Traveling Front, Animationand selectExport.

Referenzen

ÄHNLICHE DOKUMENTE

Since these refined error estimates can be applied in a much more general context, we organize this paper by first developing the general methods and then applying them to the

Er studierte Lehr- amt fu¨r Mathematik und Geographie in Dresden, wo er 1984 auch seine Doktorar- beit im Fach Geometrie verteidigte.. Nach der Habilitation an der

The black solidus line shows the depth-dependent freez- ing point of fresh water (Feistel, 2003; Jackett et al., 2006), the red solidus line in- dicates the linearized form of

In these cases the decay rates are deduce from the ratio of observed activity A to the absolute number of radioactive atoms N in a sample.. A = λN = ⇒ τ = 1 λ

Problem 2 (Tayloring schemes) While the task in problem 2 was to use Taylor expansions in order to approximate the second derivative, we first recall the finite difference method

Hint: In the Model Builder window you should click on the Show icon and enable everything that is possible from the menu: Expand Sections (Equation View, Override and Con-

We then, in the wake of Oelschl¨ ager (1990), Tran (2006, 2008), Ferri` ere and Tran (2009), Jagers and Klebaner (2000, 2011), provide a law of large numbers that al- lows

Fisher's Fundamental Theorem of Natural Selection is extended to the selection mutation model with mutation rates ' i j ' €1, i.e.. depending only on the target gene, by