View Issue Details

IDProjectCategoryView StatusLast Update
0001085OpenFOAM[All Projects] Bugpublic2015-02-04 22:24
ReportermaHeinAssigned Tohenry 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSDebianOS Version7
Product Version 
Fixed in Version 
Summary0001085: Boundary velocity wrong with non-constant omega in MRF source
DescriptionWhen using a non-constant value for omega in a MRF source, the boundary velocity is not updated correctly.
Steps To Reproduce1. Take the tutorial: "incompressible/simpleFam/mixerVessel2D"

2. Change omega in "system/fvOptions" from

        omega 104.72;

   To

        omega table
        (
            (0 0)
            (10 104.72)
        );

3. Run for 500 iterations and check the results of the velocity field at the rotor patch.
Additional InformationRestarting the simulation at time step 500 and let it run for another 50 iterations gives the correct result.
TagsNo tags attached.

Activities

user4

2013-11-18 15:45

  ~0002641

Note: the boundary values on U are only updated at startup - the source gets calculated correct though.

maHein

2013-11-18 15:59

reporter   ~0002642

When the boundary velocity is only updated at startup, the results are different compared to a case with constant velocity.

Is it possible to update the boundary velocity on runtime?

user4

2015-02-03 14:54

 

nonConstantMRF.patch (1,736 bytes)
From 87dc45f49520eb568046502b90b0939eb16083ed Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Tue, 3 Feb 2015 12:31:01 +0000
Subject: [PATCH] BUG: MRF: update velocity in case of non-constant rotation

---
 src/fvOptions/sources/derived/MRFSource/MRFSource.C | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/fvOptions/sources/derived/MRFSource/MRFSource.C b/src/fvOptions/sources/derived/MRFSource/MRFSource.C
index 59fd4ff..531d35f 100644
--- a/src/fvOptions/sources/derived/MRFSource/MRFSource.C
+++ b/src/fvOptions/sources/derived/MRFSource/MRFSource.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,6 +103,10 @@ void Foam::fv::MRFSource::addSup
     const label fieldI
 )
 {
+    // Make sure the boundary velocity is consistent with the rotation
+    // (not needed for constant rotation)
+    mrfPtr_->correctBoundaryVelocity(const_cast<volVectorField&>(eqn.psi()));
+
     // Add to rhs of equation
     mrfPtr_->addCoriolis(eqn, true);
 }
@@ -115,6 +119,10 @@ void Foam::fv::MRFSource::addSup
     const label fieldI
 )
 {
+    // Make sure the boundary velocity is consistent with the rotation
+    // (not needed for constant rotation)
+    mrfPtr_->correctBoundaryVelocity(const_cast<volVectorField&>(eqn.psi()));
+
     // Add to rhs of equation
     mrfPtr_->addCoriolis(rho, eqn, true);
 }
-- 
1.8.1.4

nonConstantMRF.patch (1,736 bytes)

user4

2015-02-03 14:54

  ~0003659

Could you try attached patch and let us know?

maHein

2015-02-04 08:11

reporter   ~0003669

The patch does fix this issue.

henry

2015-02-04 22:24

manager   ~0003677

Resolved by commit 4f1f0816ab10fafc30fcf496e1cb6cb70981faaa

Issue History

Date Modified Username Field Change
2013-11-18 07:28 maHein New Issue
2013-11-18 15:45 user4 Note Added: 0002641
2013-11-18 15:59 maHein Note Added: 0002642
2015-02-03 14:54 user4 File Added: nonConstantMRF.patch
2015-02-03 14:54 user4 Note Added: 0003659
2015-02-04 08:11 maHein Note Added: 0003669
2015-02-04 22:24 henry Note Added: 0003677
2015-02-04 22:24 henry Status new => resolved
2015-02-04 22:24 henry Resolution open => fixed
2015-02-04 22:24 henry Assigned To => henry