Logo Search packages:      
Sourcecode: necpp version File versions  Download package

void nec_context::ex_card ( enum excitation_type  itmp1,
int  itmp2,
int  itmp3,
int  itmp4,
nec_float  tmp1,
nec_float  tmp2,
nec_float  tmp3,
nec_float  tmp4,
nec_float  tmp5,
nec_float  tmp6 
)

"ex" card, excitation parameters

			EX	EXCITE STRUCTURE, LAST ENCOUNTERED=USED
				I1- 0=E VOLTAGE (A), 1=LINEAR WAVE (B), 2= R CIRC WAVE (B)
				3=L CIRC WAVE (B), 4= CURRENT (C), 5= VOLTAGE DISC. (A)
				I2- (A) SOURCE TAG#, (B) # TH ANGLS, (C) BLANK
				I3- (A) SOURCE SEG#, (B) # PH ANGLS, (C) BLANK
				I4- (A) XX= ADMIT.,IMPED. PRINT, X=0 NO/1 DO, (BC), 1= ADM. PRINT
				F1- (A) EREAL, (B) TH ANGL, (C) X OF SOURCE
				F2- (A) EIMAG, (B) PH ANGL, (C) Y OF SOURCE
				F3- (A) NORM FOR I4, (B) ET ANGL, Z OF SOURCE
				F4- (A) BLANK, (B) TH INC, (C) ALPHA ANGLE FROM XY
				F5- (A) BLANK, (B) PH INC, (C) BETA ANGLE FROM X
				F6- (A) BLANK, (B) MIN/MAJ AXIS, PRODUCT AMPS X LENGTH
				
				// NOT YET DONE... F7- (A) BLANK, (B) INCIDENT AMPLITUDE (Volts/m)
	

Definition at line 469 of file nec_context.cpp.

References c_geometry::get_segment_number(), init_voltage_sources(), safe_array< T >::resize(), c_geometry::segment_length, and safe_array< T >::size().

{
      DEBUG_TRACE("ex_card(" << itmp1
            << "," << itmp2 
            << "," << itmp3 
            << "," << itmp4 
            << "," << tmp1 
            << "," << tmp2 
            << "," << tmp3 
            << "," << tmp4 
            << "," << tmp5 
            << "," << tmp6
            << ")");

      if ( iflow != 5)
      {
            init_voltage_sources();

            iflow=5;
            
            if ( processing_state > 3)
                  processing_state=3;
      }

      masym = itmp4/10;
      ASSERT(itmp1 >= 0);
      
      m_excitation_type = itmp1;
      if ( (m_excitation_type == EXCITATION_VOLTAGE) || (m_excitation_type == EXCITATION_VOLTAGE_DISC) )  // (Voltage excitation)
      {
            ntsol=0;
      
            if ( m_excitation_type == EXCITATION_VOLTAGE_DISC) // Voltage DISC. 
            {
                  nvqd++;
                  ivqd.resize(nvqd );
                  iqds.resize(nvqd );
                  vqd.resize( nvqd );
                  vqds.resize(nvqd );
            
                  int indx = nvqd-1;
      
                  ivqd[indx]= m_geometry->get_segment_number( itmp2, itmp3);
                  vqd[indx]= nec_complex( tmp1, tmp2);
                  if ( abs( vqd[indx]) < 1.e-20)
                        vqd[indx] = cplx_10();
      
                  iped= itmp4- masym*10;
                  impedance_norm_factor= tmp3;
                  if ( (iped == 1) && (impedance_norm_factor > 0.0) )
                        iped=2;
                  return; /* continue card input loop */
            } /* if ( m_excitation_type == EXCITATION_VOLTAGE_DISC) */
      
            voltage_source_count++;
            source_segment_array.resize(voltage_source_count );
            source_voltage_array.resize(voltage_source_count );
      
            {
                  int indx = voltage_source_count-1;
            
                  int seg_number = m_geometry->get_segment_number( itmp2, itmp3);
                  if (seg_number > m_geometry->segment_length.size())
                  {
                        nec_exception* nex = new nec_exception("CHECK DATA, PARAMETER SPECIFYING EXCITATION SOURCE SEGMENT [");
                        nex->append(seg_number);
                        nex->append("] IS TOO LARGE" );
                        throw nex;
                  }
                  source_segment_array[indx] = seg_number;
                  
                  DEBUG_TRACE("Voltage Source: " << nec_complex( tmp1, tmp2));
                  source_voltage_array[indx]= nec_complex( tmp1, tmp2);
                  if ( abs( source_voltage_array[indx]) < 1.e-20)
                        source_voltage_array[indx] = cplx_10();
            
                  iped= itmp4- masym*10;
                  impedance_norm_factor= tmp3;
                  if ( (iped == 1) && (impedance_norm_factor > 0.0) )
                        iped = 2;
                  return; /* continue card input loop */
            }     
      } /* if ( (m_excitation_type == 0) || (m_excitation_type == 5) ) */

      nthi= itmp2;
      nphi= itmp3;
      xpr1= tmp1;
      xpr2= tmp2;
      xpr3= tmp3;
      xpr4= tmp4;
      xpr5= tmp5;
      xpr6= tmp6;
      // xpr7= tmp7; Put this in here once we are parsing NEC4 excitation stuff.
      voltage_source_count=0;
      nvqd=0;
      thetis= xpr1;
      phiss= xpr2;
}


Generated by  Doxygen 1.6.0   Back to index