|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Join Date: Aug 2011
Posts: 1
Rep Power: 0 ![]() |
hello everybody,
I try to use non-inertial system to solve heaving elliptic plate. My present case is very simple.It's a 2D elliptic plate heaving cosinely.I add a source term into the N-S equation developing icoFoam.My boundary conditions also are changed into non-inertial system. The new solver can be compiled and run successfully.But the result is totally wrong.I don't know where the problem is. I attach my test case, so that someone who know this (which is not really difficult ;-)) can give me a hint. Best regards and thanks in advance for any reply Monica PS:here is my solver Code:
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "initContinuityErrs.H"
volVectorField Ftmp = F;//store the initial value of F
volVectorField Uetmp = Ue;//store the entangling velocity
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "readPISOControls.H"
#include "CourantNo.H"
dimensionedScalar t = runTime.value();// get current time
F = Ftmp * cos(omega * t);//modify F of the internal field
F.correctBoundaryConditions();//correct the boundary values
fvVectorMatrix UrelEqn
(
fvm::ddt(Urel)
+ fvm::div(phi, Urel)
- fvm::laplacian(nu, Urel)
+ F//add the source item
);
solve(UrelEqn == -fvc::grad(p));
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
volScalarField rAUrel(1.0/UrelEqn.A());
Urel = rAUrel*UrelEqn.H();
phi = (fvc::interpolate(Urel) & mesh.Sf())
+ fvc::ddtPhiCorr(rAUrel, Urel, phi);
adjustPhi(phi, Urel, p);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rAUrel, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
#include "continuityErrs.H"
Urel -= rAUrel*fvc::grad(p);
Urel.correctBoundaryConditions();
//---update absolute velocity
Ue=Uetmp * sin(omega * t);
Ue.correctBoundaryConditions();//correct the boundary values
Uabs = Urel + Ue;
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //
|
|
|
|
|
|
![]() |
| Tags |
| heaving plate, icofoam, non-inertial system |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 18:56 |
| Need ideas-fuel discharge system | Jan | FLUENT | 1 | October 10, 2006 23:05 |
| Need ideas-fuel discharge system | Jan | CFX | 1 | October 9, 2006 08:16 |
| need ideas-fuel discharge system | Jan | CD-adapco | 0 | October 9, 2006 04:31 |
| Need ideas-fuel discharge system | Jan | Main CFD Forum | 0 | October 9, 2006 04:27 |