本文整理汇总了C++中FlowField::getH方法的典型用法代码示例。如果您正苦于以下问题:C++ FlowField::getH方法的具体用法?C++ FlowField::getH怎么用?C++ FlowField::getH使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlowField
的用法示例。
在下文中一共展示了FlowField::getH方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
void KEStencilF::apply(FlowField& flowField, int i, int j, int k) {
// turbulent kinetic energy
wip.tke = flowField.getTke(i, j, k);
wip.tkes = (wip.tke > 0) - (wip.tke < 0);
wip.tke = fabs(wip.tke);
// dissipation rate
wip.epsilon = flowField.getEpsilon(i, j, k);
wip.epsilons = (wip.epsilon > 0) - (wip.epsilon < 0);
wip.epsilon = fabs(wip.epsilon);
// closest wall distance
wip.delta = flowField.getH(i, j, k);
// turbulent Reynolds numbers
wip.Rt = wip.tke * wip.tke * wip.Re / max(wip.epsilon, err);
wip.Rd = sqrt(wip.tke) * wip.delta * wip.Re;
// dimensionless wall distance
FLOAT uTau = pow(cmu, 0.25) * sqrt(wip.tke);
wip.yplus = uTau * wip.delta * wip.Re;
// calculate factors
calc();
// limitation for diffusion and reaction terms
// FLOAT gamma = flowField.getEpsilon(i,j,k)/max(1e-8, flowField.getTke(i,j,k));
// wop.f2 *= (wop.f2*gamma> 0.0) ? 1.0 : 0.0;
// wop.f3 = ( gamma> 0.0) ? 1.0 : 0.0;
// write factors
flowField.getFmu(i, j, k) = wop.fmu;
flowField.getF1(i, j, k) = wop.f1;
flowField.getF2(i, j, k) = wop.f2;
flowField.getF3(i, j, k) = wop.f3;
flowField.getD(i, j, k) = wop.D;
flowField.getE(i, j, k) = wop.E;
}