StFlow::_getInitialSoln now sets the solution to a valid thermodynamic state
This fixes errors that occured when the "showSolution" method was called before explicitly setting the initial solution profile.
This commit is contained in:
parent
e6999d1ac8
commit
7ed2a02953
1 changed files with 3 additions and 7 deletions
|
|
@ -117,15 +117,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// Write the initial solution estimate into
|
||||
/// array x.
|
||||
/// Write the initial solution estimate into array x.
|
||||
virtual void _getInitialSoln(doublereal* x) {
|
||||
for (size_t j = 0; j < m_points; j++) {
|
||||
x[index(2,j)] = T_fixed(j);
|
||||
for (size_t k = 0; k < m_nsp; k++) {
|
||||
x[index(4+k,j)] = Y_fixed(k,j);
|
||||
}
|
||||
T(x,j) = m_thermo->temperature();
|
||||
m_thermo->getMassFractions(&Y(x, 0, j));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue