diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 05f8add..bf82e8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,5 +37,7 @@ canteraTest: - wmake diffusivityModel - wmake testApp - ./testApp/canteraTest -case testApp/gri - - + artifacts: + paths: + - ./testApp/*/canteraTest.log + when: always diff --git a/testApp/chemFoam.C b/testApp/chemFoam.C index 86d3805..ffaf40f 100644 --- a/testApp/chemFoam.C +++ b/testApp/chemFoam.C @@ -130,7 +130,6 @@ int main(int argc, char *argv[]) forAll(thermo.composition().species(), k) { - // Info << thermo.composition().species()[k] << tab << 100. * (diff.D(k)[0] - Dc[k]) / Dc[k] << endl; if (exceedTolerence(relError(diff.D(k)[0], Dc[k]))) { Info << thermo.composition().species()[k] << ", T = " << T[i] @@ -138,15 +137,39 @@ int main(int argc, char *argv[]) errorCount++; } testCount++; + + post<< thermo.T()[0] << token::TAB + << thermo.composition().species()[k] << token::TAB + << diff.D(k)[0] << token::TAB + << Dc[k] << token::TAB + << 100*(relError(diff.D(k)[0], Dc[k])) << endl; } - // Info << "mu" << tab << 100.*(diff.mu()[0] - tr_->viscosity())/tr_->viscosity() << endl; if (exceedTolerence(relError(diff.mu()[0], tr_->viscosity()))) { - Info << "T = " << T[i] << " relative error = " << (100. * relError(diff.mu()[0], tr_->viscosity())) << " %"<< endl; + Info << "mu, T = " << T[i] << " relative error = " << (100. * relError(diff.mu()[0], tr_->viscosity())) << " %"<< endl; errorCount++; } testCount++; + + post<< thermo.T()[0] << token::TAB + << "mu" << token::TAB + << diff.mu()[0] << token::TAB + << tr_->viscosity() << token::TAB + << 100*(relError(diff.mu()[0], tr_->viscosity())) << endl; + + if (exceedTolerence(relError(diff.k()[0], tr_->thermalConductivity()))) + { + Info << "k, T = " << T[i] << " relative error = " << (100. * relError(diff.k()[0], tr_->thermalConductivity())) << " %"<< endl; + errorCount++; + } + testCount++; + + post<< thermo.T()[0] << token::TAB + << "k" << token::TAB + << diff.k()[0] << token::TAB + << tr_->thermalConductivity() << token::TAB + << 100*(relError(diff.k()[0], tr_->thermalConductivity())) << endl; } Info << errorCount << " / " << testCount << " End" << nl << endl; diff --git a/testApp/createFields.H b/testApp/createFields.H index 9e0d087..21f2a4d 100644 --- a/testApp/createFields.H +++ b/testApp/createFields.H @@ -64,3 +64,11 @@ ); diffusivityModel diff(thermo); + + OFstream post(args.path()/"canteraTest.log"); + + post << "Temperature [K]" << token::TAB + << "Property" << token::TAB + << "OpenFOAM" << token::TAB + << "Cantera" << token::TAB + << "Relative Error" << endl; diff --git a/testApp/readInitialConditions.H b/testApp/readInitialConditions.H index 8e340a7..0a3d485 100644 --- a/testApp/readInitialConditions.H +++ b/testApp/readInitialConditions.H @@ -106,3 +106,5 @@ << " T = " << thermo.T()[0] << " [K] " << nl << " rho = " << rho[0] << " [kg/m3]" << nl << endl; + + Info << "Mass Fractions" << Y0 << endl;