View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004128 | OpenFOAM | Bug | public | 2024-08-06 13:03 | 2024-08-10 22:24 |
Reporter | tniemi | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0004128: Zonal solid thermo, wrong properties at processor boundaries | ||||
Description | Hi, When using zonal-method to specify eg. kappa (or Cv,rho) in solid thermo, the processor boundaries get populated with cell values of the current processor instead of the values of the neighbouring processor. This leads to issues if the processor boundary happens to lie in between two zones. (Which can occur in practical cases, as unlikely as it may sound :) ) I have attached an example patch with vtf.correctBoundaryConditions() which appears to solve the issue. Also, the error message "Valid type entries are 'uniform' or 'file' for " is missing the zonal-option. | ||||
Steps To Reproduce | Attached is a simple 1D case with two zones with different kappa and decomposed into two domains so that the zone switches when the processor changes. Run ./Allrun, check logs: Serial writing object wallHeatFlux min, max, Q [W], q [W/m^2] for patch wall_left = 2079.63084, 2079.63085, 0.207963084, 2079.63084 min, max, Q [W], q [W/m^2] for patch wall_right = -2080.67443, -2080.67433, -0.208067439, -2080.67439 -> conserves energy Parallel writing object wallHeatFlux min, max, Q [W], q [W/m^2] for patch wall_left = 1120.72926, 1120.72973, 0.112072939, 1120.72939 min, max, Q [W], q [W/m^2] for patch wall_right = -94610.3613, -94610.3156, -9.46103373, -94610.3373 min, max, Q [W], q [W/m^2] for patch wall_topBottom = 0, 0, 0, 0 -> conservation error Also, in eg. processor0/500/solid/kappa internalField uniform 1; procBoundary0to1 { type processor; value uniform 1; // Should be 100 } | ||||
Tags | No tags attached. | ||||
|
zonalFix.diff (993 bytes)
diff --git a/src/thermophysicalModels/solidThermo/constSolidThermo/constSolidThermoTemplates.C b/src/thermophysicalModels/solidThermo/constSolidThermo/constSolidThermoTemplates.C index 7e2241bd6c..45edabbc1a 100644 --- a/src/thermophysicalModels/solidThermo/constSolidThermo/constSolidThermoTemplates.C +++ b/src/thermophysicalModels/solidThermo/constSolidThermo/constSolidThermoTemplates.C @@ -107,6 +107,8 @@ Foam::VolField<Type> Foam::constSolidThermo::readProperty Info << endl; } + vtf.correctBoundaryConditions(); + return vtf; } else if (propType == "file") @@ -127,7 +129,8 @@ Foam::VolField<Type> Foam::constSolidThermo::readProperty else { FatalErrorInFunction - << "Valid type entries are 'uniform' or 'file' for " << name + << "Valid type entries are " + << "'uniform', 'zonal' or 'file' for " << name << abort(FatalError); return VolField<Type>::null(); |
|
Thanks for the bug-report and patch Resolved in OpenFOAM-dev by commit 9cd60f594b691f250b4d9c45108e0b27026f7e69 |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-08-06 13:03 | tniemi | New Issue | |
2024-08-06 13:03 | tniemi | File Added: zonalBug.tar.gz | |
2024-08-06 13:03 | tniemi | File Added: zonalFix.diff | |
2024-08-10 22:24 | henry | Assigned To | => henry |
2024-08-10 22:24 | henry | Status | new => resolved |
2024-08-10 22:24 | henry | Resolution | open => fixed |
2024-08-10 22:24 | henry | Fixed in Version | => dev |
2024-08-10 22:24 | henry | Note Added: 0013359 |