View Issue Details

IDProjectCategoryView StatusLast Update
0004223OpenFOAMBugpublic2025-03-06 15:21
Reportercgoessni Assigned Tohenry  
PrioritylowSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Versiondev 
Fixed in Versiondev 
Summary0004223: timeVaryingMappedFixedValue patchField misses timeToUserTime call
DescriptionWhen running a simulation with a timeVaryingMappedFixedValue patch field,
Steps To ReproduceRun the attached case, which is kivaTest shifted by 720 CAD (so starting at 540 CAD) and using timeVaryingMappedFixedValue for one temperature as a demonstration case.

In log.foamRun, it reads:

--> FOAM FATAL ERROR:
Cannot find starting sampling values for current time 0.06
Have sampling values for times 1(540)
In directory "constant/boundaryData/piston" of field T

    From function void Foam::timeVaryingMappedFvPatchField<Type>::checkTable() [with Type = double]
    in file fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField.C at line 139.

FOAM exiting
Additional InformationThe attached patch fixes the issue here. I am not sure if there are other conversions missing as well.
TagsNo tags attached.

Activities

cgoessni

2025-03-06 12:24

reporter  

timeVaryingMappedWallDiff.txt (721 bytes)   
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField.C
index 531f467..92aa986 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField.C
@@ -129,7 +129,7 @@ void Foam::timeVaryingMappedFvPatchField<Type>::checkTable()
     (
         sampleTimes_,
         startSampleTime_,
-        time().value(),
+        time().userTimeValue(),
         lo,
         hi
     );

cgoessni

2025-03-06 12:24

reporter   ~0013540

Sorry, the description should be:

When running a simulation with a timeVaryingMappedFixedValue patch field, the file lookup seems to be in the wrong time folder.

henry

2025-03-06 15:21

manager   ~0013542

Resolved by commit b2e2452428fad4ce6119768531f10ae318b69e5d

Issue History

Date Modified Username Field Change
2025-03-06 12:24 cgoessni New Issue
2025-03-06 12:24 cgoessni File Added: timeVaryingMappedWallDiff.txt
2025-03-06 12:24 cgoessni File Added: kivaTest_timeVaryingMappedWall.tgz
2025-03-06 12:24 cgoessni Note Added: 0013540
2025-03-06 15:21 henry Assigned To => henry
2025-03-06 15:21 henry Status new => resolved
2025-03-06 15:21 henry Resolution open => fixed
2025-03-06 15:21 henry Fixed in Version => dev
2025-03-06 15:21 henry Note Added: 0013542