Working on external (global) forcing or (local) pacing
-
How to add a local pacing or forcing?
"I want a system to be forced partially, not entirely, like a pacemaker to create waves, what should I do with PDEs?"
Idea is that working on two models, one is forced (pacemaker region), the other is autonomous (background area).
Here is the detail:
-
Step 1: Mouse-drag a local area where the forcing is expected, then from the main menu
choose Model | Add a new model.
-
Step 2: Click on the area, then choose Model | Periodic forcing to make the local area been forced only.
You will be asked to provide the forcing frequency, forcing anmplitude, and other information.
-
Hook on a forcing
When a system is subjected to external forcing, a forcing term will be appear in one (or more than one) equation(s).
Assume your embedded model kinetics is autonomous. The way to add the forcing term is simply "hook on" by choosing Model | Periodic forcing.
Then, everytime when the Element::Integration method is called, a forcing is added right after the kinetics.
void Element::Integration(bool isOdd, double t, double dt)
{
m_pModel->Kinetics(x,y,t,dt);
if(m_pModel->m_pForcing) // Hook on the forcing
{
switch (m_pModel->m_pForcing->m_nApply)
{
case 0:
y[0] += m_pModel->m_pForcing->fcos(t);
break;
case 1:
y[0] += m_pModel->m_pForcing->fcos(t);
y[1] += m_pModel->m_pForcing->fsin(t);
break;
}
}
...
}
|
Back to Quick Start.
|