本文整理汇总了C++中TransportMaterialStatus::giveTempStateVector方法的典型用法代码示例。如果您正苦于以下问题:C++ TransportMaterialStatus::giveTempStateVector方法的具体用法?C++ TransportMaterialStatus::giveTempStateVector怎么用?C++ TransportMaterialStatus::giveTempStateVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransportMaterialStatus
的用法示例。
在下文中一共展示了TransportMaterialStatus::giveTempStateVector方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: get_b
double HeMoTKMaterial :: computeCapacityCoeff(MatResponseMode mode, GaussPoint *gp, TimeStep *atTime)
{
if ( mode == Capacity_ww ) {
return 1.0 * rho;
} else if ( mode == Capacity_wh ) {
return 0.0;
} else if ( mode == Capacity_hw ) {
TransportMaterialStatus *status = ( TransportMaterialStatus * ) this->giveStatus(gp);
FloatArray s;
double w, t;
s = status->giveTempStateVector();
if ( s.isEmpty() ) {
_error("computeCapacityCoeff: undefined state vector");
}
w = s.at(2);
t = s.at(1);
return get_b(w, t) * get_latent(w, t);
} else if ( mode == Capacity_hh ) {
TransportMaterialStatus *status = ( TransportMaterialStatus * ) this->giveStatus(gp);
FloatArray s;
double w, t;
s = status->giveTempStateVector();
if ( s.isEmpty() ) {
_error("computeCapacityCoeff: undefined state vector");
}
w = s.at(2);
t = s.at(1);
return get_ceff(w, t);
} else {
_error("Unknown MatResponseMode");
}
return 0.0; // to make compiler happy
}
示例2: if
void
HeMoTKMaterial :: matcond3d(FloatMatrix &d, GaussPoint *gp, MatResponseMode mode, TimeStep *atTime)
// function creates conductivity matrix of the
// isotropic heat material for 3D problems
//
// d - conductivity matrix of the material
// 25.9.2001
{
double k = 0.0, w = 0.0, t = 0.0;
TransportMaterialStatus *status = ( TransportMaterialStatus * ) this->giveStatus(gp);
FloatArray s;
// w = Tm->ip[ipp].av[0];
// t = Tm->ip[ipp].av[1];
s = status->giveTempStateVector();
if ( s.isEmpty() ) {
_error("matcond3d: undefined state vector");
}
w = s.at(2);
t = s.at(1);
if ( mode == Conductivity_ww ) {
k = perm_ww(w, t);
} else if ( mode == Conductivity_wh ) {
k = perm_wt(w, t);
} else if ( mode == Conductivity_hw ) {
k = perm_ww(w, t) * get_latent(w, t);
} else if ( mode == Conductivity_hh ) {
k = get_chi(w, t) + get_latent(w, t) * perm_wt(w, t);
} else {
_error("Unknown MatResponseMode");
}
d.resize(3, 3);
d.at(1, 1) = k;
d.at(1, 2) = 0.0;
d.at(1, 3) = 0.0;
d.at(2, 1) = 0.0;
d.at(2, 2) = k;
d.at(2, 3) = 0.0;
d.at(3, 1) = 0.0;
d.at(3, 2) = 0.0;
d.at(3, 3) = k;
}