Created as the part of the course Field Simulation with Finite Element Methods (BMEVIHVJV35) at the Budapest University of Technology and Economics (BUTE). For legal matters see the included LICENSE file, with the following restrictions: the use of this material for the above mentioned course or its successors is prohibited, except to study the project while seeking technical help, e.g how to use specific Matlab functions. But regarding the additional content, please do not use this material which was made available to help other enthusiasts gaining a better control above the PDE Toolbox of Matlab.
The memristor_pde.m function creates a PDE model then prcesses it including the following steps:
- Geometry
- Mesh
- Boundary conditions
- PDE coefficient specification
- Solution
- semi_a: semiaxis of the ellipse (along the X-axis)
- semi_b: semiaxis of the ellipse (along the Y-axis)
- boundary_offset: offset of the material boundary (0 means the sigmoid is "centered" at 0)
- plot_flag: binary variable to switch the plot function on/off
- results: solution of the PDE
- model: PDE model
help memristor_pde % if you need help, it prints out both the functionality and the description of the parameters
[results, model] = memristor_pde(semi_a, semi_b, boundary_offset, plot_flag)
This file is basically the same as memristor_pde.m, but it uses the PDE Toolbox GUI to solve the problem. Use it only for experimenting (because you get visual feedback on the spot), but it makes solving even slightly different problems very slow, for it needs to build up the whole GUI-thing from scratch if a script is ran with modified parameters.
memristor_pde_gui.m
The process_results.m script makes the postporcessing and visualization on the solution(s) obtained with memristor_pde.m.
The following parameters can be specified to customize the created plots/animations:
- plot_mode:
- 0 - u-plot
- 1 - E + u-plot without c
- 2 - E + u-plot with c (D)
- change_mode:
- 0 - ellipse size will be changed
- 1 - state boundary will be changed
- 2 - ellipse and state boundary will be changed
- en_3D: while plotting, creates a 3D figure is set to nonzero
- write_video: flag to specify whether to write videos into file (.avi), target directory is ./videos
- show_animation: flag to specify whether to show the animations
help process_results % if you need help, it prints out both the functionality and the description of the parameters
process_results