View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004043 | OpenFOAM | Bug | public | 2023-12-19 14:43 | 2023-12-20 10:24 |
Reporter | jonas_buenning | Assigned To | henry | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 11 | ||||
Fixed in Version | 11 | ||||
Summary | 0004043: wrong results for the solver module "solid" for nNonOrthogonalCorrectors > 0 due to not updating the temperature field | ||||
Description | The current implementation of the thermophysicalPredictor of the solid solver looks like this: void Foam::solvers::solid::thermophysicalPredictor() { volScalarField& e = thermo_.he(); const volScalarField& rho = thermo_.rho(); while (pimple.correctNonOrthogonal()) { fvScalarMatrix eEqn ( fvm::ddt(rho, e) + thermophysicalTransport->divq(e) == fvModels().source(rho, e) ); eEqn.relax(); fvConstraints().constrain(eEqn); eEqn.solve(); fvConstraints().constrain(e); } thermo_.correct(); } The line thermo_.correct(); is outside of the nonorthogonality corrector loop. This is however a problem: thermo_.correct() will correct the temperature field using the internal energy/enthalphy field (in the esiest case just as T = e/Cv). The temperature field will however also be used in assembling the system for the energy equation, specifically inside of thermophysicalTransport->divq(e). For example for the isotropic model divq(e) returns -fvc::laplacian(kappa(), thermo.T()) - fvm::laplacianCorrection(kappa()/thermo.Cv(), e). In short, the temperature field is used for assembling the system, but not updated every loop iteration. This causes wrong results. Solution: thermo_.correct(); needs to be moved inside of the while loop. I've already tested this and the results look correct | ||||
Steps To Reproduce | Example case attached. Change nNonOrthogonalCorrectors to 0 to see the difference. Change nOuterCorrectors to value > 1 to see that the problem is specifically caused by the nonorthogonality corrector loop. | ||||
Tags | No tags attached. | ||||
|
|
|
Resolved in OpenFOAM-11 by commit c46acc5d125510d78f9f7d17d46d3a6dd1c1bd7a Resolved in OpenFOAM-dev by commit 3c347ca566f16112fb8c756aec0423b907338d2d |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-12-19 14:43 | jonas_buenning | New Issue | |
2023-12-19 14:43 | jonas_buenning | File Added: wrongSolidHeatTranport.tar.xz | |
2023-12-20 10:24 | henry | Assigned To | => henry |
2023-12-20 10:24 | henry | Status | new => resolved |
2023-12-20 10:24 | henry | Resolution | open => fixed |
2023-12-20 10:24 | henry | Fixed in Version | => 11 |
2023-12-20 10:24 | henry | Note Added: 0013173 |