View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003231 | OpenFOAM | Bug | public | 2019-05-03 14:00 | 2019-05-03 17:16 |
Reporter | jkau | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 14.10 |
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0003231: DTCHullMoving tutorial produces strange results | ||||
Description | DTCHullMoving tutorial: After some seconds simulation time the hull is completely above the free surface. OpenFOAM: dev-562040f5728e from April, 30 | ||||
Steps To Reproduce | Just run the tutorial for some seconds simulation time. | ||||
Tags | No tags attached. | ||||
|
|
|
I think the problem is in rigidBodyMeshMotion::solve(), as "g" is not found by mesh().time() |
|
provided patch should fix the issue g_lookup.patch (851 bytes)
diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C index 3a3bb60..7d22022 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C @@ -245,10 +245,12 @@ void Foam::rigidBodyMeshMotion::solve() const scalar ramp = ramp_->value(t.value()); - if (t.foundObject<uniformDimensionedVectorField>("g")) + Info << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1" << endl; + + if (mesh().foundObject<uniformDimensionedVectorField>("g")) { g() = - ramp*t.lookupObject<uniformDimensionedVectorField>("g").value(); + ramp*mesh().lookupObject<uniformDimensionedVectorField>("g").value(); } if (test_) |
|
please ignore previous patch, contains unnecessary Info statement g_lookup-2.patch (770 bytes)
diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C index 3a3bb60..6b0bc9d 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C @@ -245,10 +245,10 @@ void Foam::rigidBodyMeshMotion::solve() const scalar ramp = ramp_->value(t.value()); - if (t.foundObject<uniformDimensionedVectorField>("g")) + if (mesh().foundObject<uniformDimensionedVectorField>("g")) { g() = - ramp*t.lookupObject<uniformDimensionedVectorField>("g").value(); + ramp*mesh().lookupObject<uniformDimensionedVectorField>("g").value(); } if (test_) |
|
Thanks for diagnosing the problem and proposing a fix. This issue is in two other places, I will fix all of them test and push shortly. |
|
Resolved by commit 84e71a419a8cf7f13b56b310fa14b230231b1fa7 |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-05-03 14:00 | jkau | New Issue | |
2019-05-03 14:00 | jkau | File Added: DTCHullMoving_alpha.png | |
2019-05-03 14:29 | jkau | Note Added: 0010447 | |
2019-05-03 14:42 | jkau | File Added: g_lookup.patch | |
2019-05-03 14:42 | jkau | Note Added: 0010448 | |
2019-05-03 15:01 | jkau | File Added: g_lookup-2.patch | |
2019-05-03 15:01 | jkau | Note Added: 0010449 | |
2019-05-03 16:01 | henry | Note Added: 0010450 | |
2019-05-03 17:16 | henry | Assigned To | => henry |
2019-05-03 17:16 | henry | Status | new => resolved |
2019-05-03 17:16 | henry | Resolution | open => fixed |
2019-05-03 17:16 | henry | Fixed in Version | => dev |
2019-05-03 17:16 | henry | Note Added: 0010451 |