mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fvMotionSolverEngineMesh: Corrected handling of the piston and liner velocity
Changed the motion specification to be point-based rather than cell-based. Resolves bug report http://www.openfoam.org/mantisbt/view.php?id=766
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -108,6 +108,13 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Non-const access to the pointMotionU in order to allow changes
|
||||||
|
// to the boundary motion
|
||||||
|
pointScalarField& pointMotionU()
|
||||||
|
{
|
||||||
|
return pointMotionU_;
|
||||||
|
}
|
||||||
|
|
||||||
//- Update local data for geometry changes
|
//- Update local data for geometry changes
|
||||||
virtual void movePoints(const pointField&);
|
virtual void movePoints(const pointField&);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -80,17 +80,18 @@ void Foam::fvMotionSolverEngineMesh::move()
|
|||||||
// Position of the top of the static mesh layers above the piston
|
// Position of the top of the static mesh layers above the piston
|
||||||
scalar pistonPlusLayers = pistonPosition_.value() + pistonLayers_.value();
|
scalar pistonPlusLayers = pistonPosition_.value() + pistonLayers_.value();
|
||||||
|
|
||||||
motionSolver_.cellMotionU().boundaryField()[pistonIndex_] == deltaZ;
|
scalar pistonSpeed = deltaZ/engineDB_.deltaTValue();
|
||||||
|
|
||||||
|
motionSolver_.pointMotionU().boundaryField()[pistonIndex_] == pistonSpeed;
|
||||||
|
|
||||||
{
|
{
|
||||||
scalarField linerPoints
|
scalarField linerPoints
|
||||||
(
|
(
|
||||||
motionSolver_.cellMotionU()
|
boundary()[linerIndex_].patch().localPoints().component(vector::Z)
|
||||||
.boundaryField()[linerIndex_].patch().Cf().component(vector::Z)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
motionSolver_.cellMotionU().boundaryField()[linerIndex_] ==
|
motionSolver_.pointMotionU().boundaryField()[linerIndex_] ==
|
||||||
deltaZ*pos(deckHeight_.value() - linerPoints)
|
pistonSpeed*pos(deckHeight_.value() - linerPoints)
|
||||||
*(deckHeight_.value() - linerPoints)
|
*(deckHeight_.value() - linerPoints)
|
||||||
/(deckHeight_.value() - pistonPlusLayers);
|
/(deckHeight_.value() - pistonPlusLayers);
|
||||||
}
|
}
|
||||||
@ -130,7 +131,6 @@ void Foam::fvMotionSolverEngineMesh::move()
|
|||||||
|
|
||||||
|
|
||||||
pistonPosition_.value() += deltaZ;
|
pistonPosition_.value() += deltaZ;
|
||||||
scalar pistonSpeed = deltaZ/engineDB_.deltaTValue();
|
|
||||||
|
|
||||||
Info<< "clearance: " << deckHeight_.value() - pistonPosition_.value() << nl
|
Info<< "clearance: " << deckHeight_.value() - pistonPosition_.value() << nl
|
||||||
<< "Piston speed = " << pistonSpeed << " m/s" << endl;
|
<< "Piston speed = " << pistonSpeed << " m/s" << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user