CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Need help for error message with rotating zone (https://www.cfd-online.com/Forums/openfoam-solving/59285-need-help-error-message-rotating-zone.html)

waynezw0618 December 12, 2007 09:56

HI: i want to do a calculati
 
HI:
i want to do a calculation in the impeller of centrifugal pump,
here is my pic of impeller:
http://www.cfd-online.com/OpenFOAM_D...ges/1/6161.jpg

and my solver:
/*---------------------------------------------------------------------------*\
========= |
\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\ / O peration |
\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.

OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Application
simpleFoam

Description
Steady-state solver for incompressible, turbulent flow of non-Newtonian
fluids.

\*---------------------------------------------------------------------------*/

#include "fvCFD.H"
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "incompressible/turbulenceModel/turbulenceModel.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{

# include "setRootCase.H"

# include "createTime.H"
# include "createMesh.H"
# include "createFields.H"
# include "initContinuityErrs.H"

//mesh.clearPrimitives();

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Info<< "\nStarting time loop\n" << endl;

for (runTime++; !runTime.end(); runTime++)
{
Info<< "Time = " << runTime.timeName() << nl << endl;

# include "readSIMPLEControls.H"

p.storePrevIter();

// Pressure-velocity SIMPLE corrector
{
// omega definition
dimensionedVector Omega
(
"Omega",
dimensionSet(0, 0, -1, 0, 0),
vector(0, 0,2*M_PI/60*(-595))
);
// centrigugal force
volVectorField Fcent = (Omega ^ (Omega ^ mesh.C()));


// Momentum predictor

tmp<fvvectormatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divR(U)
+ (2*Omega ^ U)
+ Fcent
);

UEqn().relax();

solve(UEqn() == -fvc::grad(p));

p.boundaryField().updateCoeffs();
volScalarField AU = UEqn().A();
U = UEqn().H()/AU;
UEqn.clear();
phi = fvc::interpolate(U) & mesh.Sf();
adjustPhi(phi, U, p);

// Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(1.0/AU, p) == fvc::div(phi)
);

pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();

if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}

# include "continuityErrs.H"

// Explicitly relax pressure for momentum corrector
p.relax();

// Momentum corrector
U -= fvc::grad(p)/AU;
U.correctBoundaryConditions();
}

turbulence->correct();

runTime.write();

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}

Info<< "End\n" << endl;

return(0);
}


// ************************************************** *********************** //

---------------------------------------------------------------------------------------------
and fvshcemes:


ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss GammaV 1;
div(phi,k) Gauss Gamma 1;
div(phi,epsilon) Gauss Gamma 1;
// div(phi,U) Gauss upwind;
// div(phi,k) Gauss upwind;
// div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian(1|A(U),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
}

--------------------------------------------------------------------------------------------------
here is fvsolutions:


solvers
{
// p ICCG 1e-06 0.01;
p AMG 1e-07 0.01 100;
U BICCG 1e-06 0.1;
k BICCG 1e-06 0.1;
epsilon BICCG 1e-06 0.1;
R BICCG 1e-06 0.1;
nuTilda BICCG 1e-06 0.1;
}

SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 28;
pRefValue 0;
}

relaxationFactors
{
p 0.2;
U 0.7;
k 0.5;
epsilon 0.5;
R 0.5;
nuTilda 0.5;
}

------------------------------------------
-------------------------------------------

error message is :
wayne:~ # impellerFoam /root/OpenFOAM/root-1.4.1/run/tutorials/impellerFoam CPump
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : impellerFoam /root/OpenFOAM/root-1.4.1/run/tutorials/impellerFoam CPump
Date : Dec 12 2007
Time : 22:20:57
Host : wayne
PID : 25573
Root : /root/OpenFOAM/root-1.4.1/run/tutorials/impellerFoam
Case : CPump
Nprocs : 1
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model kEpsilon

Starting time loop

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0581449, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0582085, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.0606352, No Iterations 1
GAMG: Solving for p, Initial residual = 1, Final residual = 0.0450743, No Iterations 5
time step continuity errors : sum local = 9.46742e+07, global = 1.08683e+07, cumulative = 1.08683e+07
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/root/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/root/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib64/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/root/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 void Foam::divide<foam::fvpatchfield,>(Foam::GeometricF ield<double,>&, Foam::GeometricField<double,> const&, Foam::GeometricField<double,> const&) in "/root/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libincompressibleTurbulenceModels.so"
#5 Foam::tmp<foam::geometricfield<double,> > Foam::operator/<foam::fvpatchfield,>(Foam::tmp<foam::geometricfie ld<double,> > const&, Foam::GeometricField<double,> const&) in "/root/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libincompressibleTurbulenceModels.so"
#6 Foam::turbulenceModels::kEpsilon::correct() in "/root/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libincompressibleTurbulenceModels.so"
#7 main in "/root/OpenFOAM/root-1.4.1/applications/bin/linux64GccDPOpt/impellerFoam"
#8 __libc_start_main in "/lib64/libc.so.6"
#9 __gxx_personality_v0 in "/root/OpenFOAM/root-1.4.1/applications/bin/linux64GccDPOpt/impellerFoam"
Floating point exception

sradl December 12, 2007 10:06

look at the dynamic mesh solve
 
look at the dynamic mesh solvers in openfoam. I guess you have to make the fluxes phi relative to the stagnant mesh region


All times are GMT -4. The time now is 06:13.