View Issue Details

IDProjectCategoryView StatusLast Update
0004087OpenFOAMBugpublic2024-05-29 15:58
Reportercgoessni Assigned Towill  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Versiondev 
Summary0004087: multiValveEngine: motion using wrong units
DescriptionIf one uses e.g., a table for the motion specification of valves / piston, then the first unit is erroneously assumed to be unitNone instead of dimTime.
Steps To ReproduceRun

$ foamDictionary -entry mover/valves/iv/motion/units -set '([CAD] [m])' constant/dynamicMeshDict

in engine2Valve2D tutorials, and try to run the simulation.
Additional InformationThis change fixes it for us:

diff --git a/src/fvMeshMovers/multiValveEngine/movingObject.C b/src/fvMeshMovers/multiValveEngine/movingObject.C
index 5b0714e..39b2710 100644
--- a/src/fvMeshMovers/multiValveEngine/movingObject.C
+++ b/src/fvMeshMovers/multiValveEngine/movingObject.C
@@ -282,7 +282,7 @@ Foam::fvMeshMovers::multiValveEngine::movingObject::movingObject
     meshMover_(engine),
     name(objectName),
     axis(dict.lookup<vector>("axis", dimless)),
- motion_(Function1<scalar>::New("motion", unitNone, dimLength, dict)),
+ motion_(Function1<scalar>::New("motion", dimTime, dimLength, dict)),
     maxMotionDistance_
     (
         dict.lookupOrDefault<scalar>("maxMotionDistance", dimLength, great)
TagsNo tags attached.

Activities

cgoessni

2024-05-29 14:36

reporter   ~0013251

So the above diff does not work because multiValveEngine does the conversion from time to userTime (s -> CAD) internally, which breaks unitConversion. Please disregard this.

will

2024-05-29 15:58

manager   ~0013252

Indeed. The mover does not support unit conversion of the time axis of the motion function. The error that you are seeing is reporting this lack of support. The time axis is hard-coded to be in units of user time. This is considered appropriate for the engine-specific context of this mover.

Issue History

Date Modified Username Field Change
2024-05-29 10:50 cgoessni New Issue
2024-05-29 14:36 cgoessni Note Added: 0013251
2024-05-29 15:58 will Assigned To => will
2024-05-29 15:58 will Status new => closed
2024-05-29 15:58 will Resolution open => no change required
2024-05-29 15:58 will Note Added: 0013252