Skip to content

Instantly share code, notes, and snippets.

@mido3ds

mido3ds/Solving.h

Created Jan 25, 2017
Embed
What would you like to do?
/* Extended */
/* add this to Solving.h */
// current in given element
double Get_Current(const Circuit*& circiut, const Element*& element);
// current in element due to another element
// (the current that due_to_element caused in element)
double Get_Current(const Circuit*& circiut, const Element*& element, const Element*& due_to_element);
// positive when dissipated, negative when supplied
double Get_Power(const Circuit*& circuit, const Element*& element);
// get power that due_to_elemnt caused in element
double Get_Power(const Circuit*& circuit, const Element*& element, const Element*& due_to_element);
// voltage difference between node1 & node2
// given the ids' of them, it searched for them in circuit
// given ids' are expected to be valid (in the circuit)
double Get_VoltDiff(const Circuit*& circuit, const int node1_id, const int node2_id);
// voltage differnt between two nodes that due_to_element caused
double Get_VoltDiff(const Circuit*& circuit, const int node1_id, const int node2_id, const Element*& due_to_element);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.