Skip to content
Snippets Groups Projects
Commit 7724762f authored by andy's avatar andy
Browse files

Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

parents 490bc356 34110020
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -108,6 +108,13 @@ public:
// 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
virtual void movePoints(const pointField&);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -80,19 +80,20 @@ void Foam::fvMotionSolverEngineMesh::move()
// Position of the top of the static mesh layers above the piston
scalar pistonPlusLayers = pistonPosition_.value() + pistonLayers_.value();
motionSolver_.cellMotionU().boundaryField()[pistonIndex_] == deltaZ;
scalar pistonSpeed = deltaZ/engineDB_.deltaTValue();
motionSolver_.pointMotionU().boundaryField()[pistonIndex_] == pistonSpeed;
{
scalarField linerPoints
(
motionSolver_.cellMotionU()
.boundaryField()[linerIndex_].patch().Cf().component(vector::Z)
boundary()[linerIndex_].patch().localPoints().component(vector::Z)
);
motionSolver_.cellMotionU().boundaryField()[linerIndex_] ==
deltaZ*pos(deckHeight_.value() - linerPoints)
*(deckHeight_.value() - linerPoints)
/(deckHeight_.value() - pistonPlusLayers);
motionSolver_.pointMotionU().boundaryField()[linerIndex_] ==
pistonSpeed*pos(deckHeight_.value() - linerPoints)
*(deckHeight_.value() - linerPoints)
/(deckHeight_.value() - pistonPlusLayers);
}
motionSolver_.solve();
......@@ -130,7 +131,6 @@ void Foam::fvMotionSolverEngineMesh::move()
pistonPosition_.value() += deltaZ;
scalar pistonSpeed = deltaZ/engineDB_.deltaTValue();
Info<< "clearance: " << deckHeight_.value() - pistonPosition_.value() << nl
<< "Piston speed = " << pistonSpeed << " m/s" << endl;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment