C++で1線地絡時の起誘導電圧の大きさを求める

1線地絡時の起誘導電圧は

\begin{align}
\dot{V}_{m}=j \omega \left ( M D \right ) \dot{I}_{0}=j 2 \pi f \left ( M D \right ) \dot{I}_{0}
\end{align}

で与えられる。大きさを考えれば

\begin{align}
V_{m}=\omega \left ( M D \right ) I_{0}= 2 \pi f \left ( M D \right ) I_{0}
\end{align}

となる。

実行結果

V  -> 99.9999[V]

ソースコード。

main.cpp

#define _USE_MATH_DEFINES
#include <iostream>
#include <math.h>
#include "InductiveInterference.h"

int main() {
    InductiveInterference wire1("wire1", 2 * M_PI * 60, 1, 1);

    wire1.setInducingCurrent(0.265258);
    wire1.getInducingVoltage();

    wire1.showInducingVoltage();

    return 0;
}

InductiveInterference.h

#pragma once
#include<iostream>
#include<ccomplex>

class InductiveInterference
{
public:
    InductiveInterference(std::string name,
        double omega, double M, double D) {
        m_name = name;

        m_omega = omega;
        m_M = M;
        m_D = D;

        m_I0 = 0.0;
        m_Vm = 0.0;
    }
    ~InductiveInterference() {
    }
    void setInducingCurrentdot(double x, double y) {
        std::complex<double> i_dot(x, y);
        m_i0dot = i_dot;
    }
    void setInducingCurrent(double I0) {
        m_I0 = I0;
    }
    void setInducingVoltage(double Vm) {
        m_Vm = Vm;
    }
    double getInducingVoltage(void) {
        return m_Vm = m_omega * m_M * m_D * m_I0;
    }
    double getInducingCurrent(void) {

        return m_Vm / (m_omega * m_M * m_D);
    }
    void showInducingCurrent(void) {
        std::cout << "I  -> " << getInducingCurrent() << "[A]" << std::endl;
    } 
    void showInducingVoltage(void) {
        std::cout << "V  -> " << getInducingVoltage() << "[V]" << std::endl;
    }
    void showInducingCurrentdot(void) {
        std::cout << "I  -> " << m_i0dot.real() << "+j" << m_i0dot.imag() << "[A]" << std::endl;
    }
private:
    std::string m_name;

    double m_omega;
    double m_M;
    double m_D;

    double m_I0;
    double m_Vm;

    std::complex<float> m_i0dot=NULL;
};

コメント

タイトルとURLをコピーしました