From 7b3f1571c11d46d2c0e1d0da4f1d41d2f8713a33 Mon Sep 17 00:00:00 2001 From: Ping He Date: Sun, 23 Jun 2024 10:48:07 -0500 Subject: [PATCH] Calculated fvSource on the fly --- .../DASolver/DAHeatTransferFoam/DAHeatTransferFoam.C | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/adjoint/DASolver/DAHeatTransferFoam/DAHeatTransferFoam.C b/src/adjoint/DASolver/DAHeatTransferFoam/DAHeatTransferFoam.C index f64a2e2d..285f0eaa 100755 --- a/src/adjoint/DASolver/DAHeatTransferFoam/DAHeatTransferFoam.C +++ b/src/adjoint/DASolver/DAHeatTransferFoam/DAHeatTransferFoam.C @@ -113,6 +113,12 @@ label DAHeatTransferFoam::solvePrimal( Info << "Time = " << runTime.timeName() << nl << endl; } + if (hasFvSource_) + { + volScalarField& fvSource = fvSourcePtr_(); + daFvSourcePtr_->calcFvSource(fvSource); + } + fvScalarMatrix TEqn( fvm::laplacian(k, T) + fvSource);