45 #include <Xyce_config.h>
57 #include <N_ERH_ErrorMgr.h>
61 #include <N_LAS_Matrix.h>
62 #include <N_LAS_Vector.h>
64 #include <N_UTL_Expression.h>
70 namespace ThermalResistor {
94 NULL,
U_METER,
CAT_NONE,
"Length of material thermally coupled to conductor");
98 NULL,
U_METER2,
CAT_NONE,
"Area of material thermally coupled to conductor");
116 NULL,
U_JMM3KM1,
CAT_NONE,
"Volumetric heat capacity of material thermally coupled to conductor");
145 .setDescription(
"Resistance Multiplier");
161 U_JMM3KM1,
CAT_NONE,
"Volumetric heat capacity of material thermally coupled to conductor");
211 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
217 temp(getDeviceOptions().temp.getImmutableValue<double>()),
220 APosEquPosNodeOffset(-1),
221 APosEquNegNodeOffset(-1),
222 ANegEquPosNodeOffset(-1),
223 ANegEquNegNodeOffset(-1),
224 f_PosEquPosNodePtr(0),
225 f_PosEquNegNodePtr(0),
226 f_NegEquPosNodePtr(0),
227 f_NegEquNegNodePtr(0),
228 tempModelEnabled(false),
229 outputInternalVarsFlag(false),
266 || (
given(
"HEATCAPACITY") &&
given(
"RESISTIVITY")) )
277 if ( !(
given(
"HEATCAPACITY")) && !(
given(
"RESISTIVITY")) &&
291 int dpSize = model_dp.size();
293 for (
int i=0;i<dpSize;++i)
296 dpTmp.
name = model_dp[i].name;
297 dpTmp.
vals = model_dp[i].vals;
299 dpTmp.
n_vars = model_dp[i].n_vars;
300 dpTmp.
lo_var = model_dp[i].lo_var;
304 dpTmp.
expr =
new Util::Expression( *(model_dp[i].expr) );
307 if (dpTmp.
name==
"RESISTIVITY")
315 if (dpTmp.
name==
"HEATCAPACITY")
370 const std::vector<int> & extLIDVecRef )
375 #ifdef Xyce_DEBUG_DEVICE
378 Xyce::dout() << std::endl << section_divider << std::endl;
379 Xyce::dout() <<
" ResistorInstance::registerLIDs" << std::endl;
380 Xyce::dout() <<
" name = " <<
getName() << std::endl;
391 #ifdef Xyce_DEBUG_DEVICE
394 Xyce::dout() <<
" li_Pos = " <<
li_Pos << std::endl;
395 Xyce::dout() <<
" li_Neg = " <<
li_Neg << std::endl;
399 #ifdef Xyce_DEBUG_DEVICE
402 Xyce::dout() << section_divider << std::endl;
505 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
540 double v_pos = solVec[
li_Pos];
541 double v_neg = solVec[
li_Neg];
544 i0 = (v_pos-v_neg)*
G;
566 double dissipation =
i0*
i0*
R;
586 bool bsuccess =
true;
590 Xyce::dout().width(28); Xyce::dout().precision(20); Xyce::dout().setf(std::ios::scientific);
662 double difference, factor;
678 G = 1.0/(
R * factor);
709 std::vector<Instance*>::iterator iter;
713 for (iter=first; iter!=last; ++iter)
715 (*iter)->processParams();
733 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
737 resistanceMultiplier(1.0),
740 tnom(getDeviceOptions().tnom)
756 if (!
given(
"THERMAL_HEATCAPACITY"))
773 std::vector<Instance*>::iterator iter;
777 for (iter=first; iter!=last; ++iter)
793 std::vector<Instance*>::const_iterator iter;
800 os <<
"Number of Resistor Instances: " << isize << std::endl;
801 os <<
" name model name Parameters" << std::endl;
802 for (i=0, iter=first; iter!=last; ++iter, ++i)
804 os <<
" " << i <<
": " << (*iter)->getName() <<
"\t";
806 os <<
"\t\tR(Tnom) = " << (*iter)->R;
807 os <<
"\tG(T) = " << (*iter)->G;
832 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
849 bool bsuccess =
true;
855 bsuccess = bsuccess && btmp;
861 double dissipation = ri.
i0*ri.
i0*ri.
R;
882 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ)
909 #pragma omp parallel for
914 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
949 .registerDevice(
"r", 2)
950 .registerModelType(
"r", 2);