|
[Sponsors] |
March 20, 2012, 21:45 |
developing icofoam in non-inertial system
|
#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; } // ************************************************************************* // |
|
March 2, 2021, 12:42 |
|
#2 |
New Member
tomas lopez olocco
Join Date: Dec 2020
Posts: 4
Rep Power: 5 |
Hi,
did you solve it? I have a similar problem that im not able to solve it. Thanks! |
|
Tags |
heaving plate, icofoam, non-inertial system |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
Need ideas-fuel discharge system | Jan | FLUENT | 1 | October 11, 2006 00:05 |
Need ideas-fuel discharge system | Jan | CFX | 1 | October 9, 2006 09:16 |
need ideas-fuel discharge system | Jan | Siemens | 0 | October 9, 2006 05:31 |
Need ideas-fuel discharge system | Jan | Main CFD Forum | 0 | October 9, 2006 05:27 |