################################################################################
# FICHE DE MODELE SABER : ED:1 REV:0
# AUTEUR:OCSIMIZE DATE:8/10/01
#
# FICHIER elec_i2var_oc.sin : ind. a du 8/10/01
# ETAT : valid
################################################################################
#==============================================================================#
element template elec_i2var_oc p m out = k
#==============================================================================#
################################################################################
# Copyright 2004 to infinity and beyond..., Ocsimize.
# This template may not be reproduced or modified
# without permission from Ocsimize. Ocsimize does not assume
# liability for the use of this template or the results
# obtained from using it as long as it is not validated by the final user.
# Usage of this template is allowed for customers of Ocsimize's customers
################################################################################
################################################################################
#
# MODIFICATION
#
# 8/10/01: creation
################################################################################
#
# pins
#
################################################################################
# Name Type Signification
#
# p electrical current input
# m electrical current output
# out var i output
################################################################################
#
# Parameters definition
#
################################################################################
# Name Default value Signification
#
# k 1 constant multiplying factor
#
################################################################################
#
# Postprocess information
#
################################################################################
# Name Unit Signification
#
# - - -
#
################################################################################
################################################################################
#
# This template takes an electrical voltage and convert it
# to a variable of current unit
#
#
# Use :
#
# -----------
# (p) O---| |-----O (out) out = k*[v(p) - v(m)]
# | |
# (m) O---| |
# | |
# -----------
#
################################################################################
# Notes :
################################################################################
#
#
#
################################################################################
electrical p, m
var i out
number k=1
{
equations {
i(p) += 0
i(m) -= 0
out : out = k*(v(p) - v(m))
}
}