Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/dfChemistryModel/dfChemistryModel.C
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ Foam::dfChemistryModel<ThermoType>::dfChemistryModel
mesh_,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
),
selectDNN_
(
IOobject
(
"selectDNN",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh_,
dimensionedScalar(dimless, -1)
),
balancer_(createBalancer()),
cpuTimes_
(
Expand Down Expand Up @@ -522,18 +535,21 @@ Foam::dfChemistryModel<ThermoType>::getGPUProblems
{
problem.DNNid = 0;
problemList.append(problem);
selectDNN_[cellI]=0;
continue;
}
if(((Qdot_[cellI] >= Qdotact2_) && (T_[cellI] < Tact2_)&&(T_[cellI] >= Tact1_))||((Qdot_[cellI] > Qdotact3_) && T_[cellI] > Tact2_)) //choose2
{
problem.DNNid = 1;
problemList.append(problem);
selectDNN_[cellI]=1;
continue;
}
if ((Qdot_[cellI] < Qdotact3_) && (T_[cellI] >= Tact2_) && (Qdot_[cellI]!=0)) //choose3
{
problem.DNNid = 2;
problemList.append(problem);
selectDNN_[cellI]=2;
continue;
}

Expand Down
3 changes: 2 additions & 1 deletion src/dfChemistryModel/dfChemistryModel.H
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public IOdictionary
volScalarField& psi_;
// heat release rate, [J/m^3/s]
volScalarField Qdot_;

// DNN selection fields
volScalarField selectDNN_;

#ifdef USE_LIBTORCH
Switch torchSwitch_;
Expand Down