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");
158 U_JMM3KM1,
CAT_NONE,
"Volumetric heat capacity of material thermally coupled to conductor");
208 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
214 temp(getDeviceOptions().temp.getImmutableValue<double>()),
217 APosEquPosNodeOffset(-1),
218 APosEquNegNodeOffset(-1),
219 ANegEquPosNodeOffset(-1),
220 ANegEquNegNodeOffset(-1),
221 f_PosEquPosNodePtr(0),
222 f_PosEquNegNodePtr(0),
223 f_NegEquPosNodePtr(0),
224 f_NegEquNegNodePtr(0),
225 tempModelEnabled(false),
226 outputInternalVarsFlag(false),
263 || (
given(
"HEATCAPACITY") &&
given(
"RESISTIVITY")) )
274 if ( !(
given(
"HEATCAPACITY")) && !(
given(
"RESISTIVITY")) &&
288 int dpSize = model_dp.size();
290 for (
int i=0;i<dpSize;++i)
293 dpTmp.
name = model_dp[i].name;
294 dpTmp.
vals = model_dp[i].vals;
296 dpTmp.
n_vars = model_dp[i].n_vars;
297 dpTmp.
lo_var = model_dp[i].lo_var;
301 dpTmp.
expr =
new Util::Expression( *(model_dp[i].expr) );
304 if (dpTmp.
name==
"RESISTIVITY")
312 if (dpTmp.
name==
"HEATCAPACITY")
367 const std::vector<int> & extLIDVecRef )
372 #ifdef Xyce_DEBUG_DEVICE
375 Xyce::dout() << std::endl << section_divider << std::endl;
376 Xyce::dout() <<
" ResistorInstance::registerLIDs" << std::endl;
377 Xyce::dout() <<
" name = " <<
getName() << std::endl;
388 #ifdef Xyce_DEBUG_DEVICE
391 Xyce::dout() <<
" li_Pos = " <<
li_Pos << std::endl;
392 Xyce::dout() <<
" li_Neg = " <<
li_Neg << std::endl;
396 #ifdef Xyce_DEBUG_DEVICE
399 Xyce::dout() << section_divider << std::endl;
457 std::string modName(
getName());
460 tmpstr = modName+
":DEV_I";
508 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
543 double v_pos = solVec[
li_Pos];
544 double v_neg = solVec[
li_Neg];
547 i0 = (v_pos-v_neg)*
G;
569 double dissipation =
i0*
i0*
R;
589 bool bsuccess =
true;
593 Xyce::dout().width(28); Xyce::dout().precision(20); Xyce::dout().setf(std::ios::scientific);
665 double difference, factor;
681 G = 1.0/(
R * factor);
712 std::vector<Instance*>::iterator iter;
716 for (iter=first; iter!=last; ++iter)
718 (*iter)->processParams();
736 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
742 tnom(getDeviceOptions().tnom)
758 if (!
given(
"THERMAL_HEATCAPACITY"))
775 std::vector<Instance*>::iterator iter;
779 for (iter=first; iter!=last; ++iter)
795 std::vector<Instance*>::const_iterator iter;
802 os <<
"Number of Resistor Instances: " << isize << std::endl;
803 os <<
" name model name Parameters" << std::endl;
804 for (i=0, iter=first; iter!=last; ++iter, ++i)
806 os <<
" " << i <<
": " << (*iter)->getName() <<
"\t";
808 os <<
"\t\tR(Tnom) = " << (*iter)->R;
809 os <<
"\tG(T) = " << (*iter)->G;
834 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
851 bool bsuccess =
true;
866 bsuccess = bsuccess && btmp;
872 double dissipation = ri.
i0*ri.
i0*ri.
R;
920 #pragma omp parallel for
925 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
960 .registerDevice(
"r", 2)
961 .registerModelType(
"r", 2);