J: Inductor Block.
MJMcCann-Consulting

Inductance and Resistance in Series for use between Integrators (or Containers)
MJMcCann-Consulting Logo

Inductor
The inductor generates a current (flux) between integrators (or containers). The source point is An, the sink is Bn.
It will accept other block types as input or output points, but does not deliver the current, so they are in effect, zero impedance sources.
As a warning, don't try to use a C-block as a constant voltage source, as it will become the source or recipient of current and its output value will change. Use any other block type, either switched off or with constant inputs. Connection to block Zero will work as it is always ignored so will behave like a ground point.
The resistance is defined by Vc+cc, the Inductance by Vp+pp and the initial current by Vd+dd, where Va is the output value of the block at An, etc.
Note that absolute values of resistance and inductance are used and the inductance must be finite

J Block Code
Procedure ActivateJ(ii:integer); //Inductor, has memory like integrator.
//Behaves like a flux device between Integrators (or containers).
//A source, B sink, C Resistance, D initial current, P inductance
// the memory of flowing current lies in Vn. Reset as other integrators.
var NewCurrent, Deriv, IA, Av, Bv ,Res, Ind :real; //NewCurrent is final current in Vn
begin with B[ii] do begin //voltages at A,B, Resistance from C and Inductance at D
if OnOff=0 then EXIT;
Av:= B[An].Vn+aa;
Bv:= B[Bn].Vn+bb;
Res:= abs(B[Cn].Vn+cc);
Ind:=abs(B[Pn].Vn+pp);
Deriv:=(Av-Bv-Vn*Res)/Ind; //Find rate of change of current
NewCurrent:= Vn+Delt*Deriv; //update current, Vn, to end of delt time.
IA:=(NewCurrent+Vn)*0.5; //calculate average current flux between An Bn
//transfer current to Integrators or dump charge to container
if B[An].Ty = 'I' then B[An].pp:=B[An].pp-IA;
if (B[An].Ty = 'C') and (An> LastSystemBlock) then B[An].Vn:=B[An].Vn-IA*Delt;
if B[Bn].Ty = 'I' then B[Bn].pp:=B[Bn].pp+IA;
if (B[Bn].Ty = 'C') and (Bn> LastSystemBlock) then B[Bn].Vn:=B[Bn].Vn+IA*Delt;
Vn:= NewCurrent; // update memory value.
end{with}
end;

MJMcCann-Consulting

Help Index:
Index/Search

Background
Simulation Concepts
Continuous Systems
Discrete Systems
McSimAPN Structure
McSimAPN Operation

Using McSimAPN
Start McSimAPN
Save Model,data
Create Blocks
Run-Hold-Reset
Link Excel+VBA

PetriNet Block Types
A activity/action
B belt conveyor
C container/constant
D diverter(random)

Analogue Block Types
E exponents
F flux/flow
G function Generator
H hysteresis
I integrator
J inductor
K logic element
L logarithms
M memory
N note/label
O oscilloscope/graph
p not assigned
Q quantizer/rounding
R relay on/off
S sin/asin/atan
T timer/clock
U user link Excel
V visual voltmeter
W sWitch selector/MUX
X multiply
y not assigned
Z random (fuZZ)
& signed summation
% division/difference
@ access/move values

Invitation. McCann can help if you have a design or operational problem that needs some technical support that is outside your team's experience, some quantitative assessment of what is really the cause of the difficulties, some design alternatives or just a fresh look by an intelligent interrogator.
If you have a problem with the behaviour of a market sector, plant, process or item of equipment and would like to get a quantitative handle on it to improve yield or optimise performance, then contact us. We are always ready to give a little time to discuss a new puzzle, in confidence, of course. We'll only worry about fees when we have some defined work. We can be flexible about how we work with you.
Top
MJMcCann-Consulting,
POB 902,
Chadds Ford PA
19317 USA.
T: 1 302 654-2953
F: 1 302 429 9458
E: mjmccann@iee.org
Request. Please let us know how you found this software and your interests by sending an email to mjmccann@iee.org Thank you Date: 2012.02.26
File: j.htm