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/)
-   -   time step huge continuity errors, please take a look at my BCs (https://www.cfd-online.com/Forums/openfoam-solving/99904-time-step-huge-continuity-errors-please-take-look-my-bcs.html)

mihaipruna April 15, 2012 11:07

time step huge continuity errors, please take a look at my BCs
 
I'm using simplefoam trying to solve a simple case of pressure driven flow through a duct shaped like an s.
i got some results when i set the inlet velocity to 0, but i understand that is not the right way to do it and that it should be set as i set it below,which crashes.


p:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.000000;
boundaryField
{
inletXmin
{
type freestreamPressure;
freestreamValue 0.000000;
}
outletXmax
{
type fixedValue;
value $internalField;
}
bottomYmin
{
type freestreamPressure;
freestreamValue 0.000000;
}
topYmax
{
type freestreamPressure;
freestreamValue 0.000000;
}
leftZmin
{
type symmetryPlane;
}
rightZmax
{
type freestreamPressure;
freestreamValue 0.000000;
}
vol1face1
{
type zeroGradient;
}
vol1face2
{
type zeroGradient;
}
vol2face1
{
type fixedValue;
value uniform 100000;
}
vol3face1
{
type fixedValue;
value $internalField;
}
}



u:
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
#include "include/initialConditions"
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0.000000 0.000000 0.000000);
boundaryField
{
inletXmin
{
type freestream;
freestreamValue uniform (0.000000 0.000000 0.000000);
}
outletXmax
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
bottomYmin
{
type freestream;
freestreamValue uniform (0.000000 0.000000 0.000000);
}
topYmax
{
type freestream;
freestreamValue uniform (0.000000 0.000000 0.000000);
}
rightZmax
{
type freestream;
freestreamValue uniform (0.000000 0.000000 0.000000);
}
leftZmin
{
type symmetryPlane;
}
vol1face1
{
type fixedValue;
value uniform (0 0 0);
}
vol1face2
{
type fixedValue;
value uniform (0 0 0);
}
vol2face1
{
type pressureInletVelocity;
value uniform (0 0 0);

}
vol3face1
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
}


error:
#0 Foam::error::printStack(Foam::Ostream&) in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 void Foam::vtkSurfaceWriter::writeData<double>(Foam::Os tream&, Foam::Field<double> const&) in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libsampling.so"
#4 void Foam::vtkSurfaceWriter::writeTemplate<double>(Foam ::fileName const&, Foam::fileName const&, Foam::Field<Foam::Vector<double> > const&, Foam::List<Foam::face> const&, Foam::word const&, Foam::Field<double> const&, bool, bool) const in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libsampling.so"
#5 void Foam::sampledSurfaces::sampleAndWrite<double>(Foam ::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libsampling.so"
#6 void Foam::sampledSurfaces::sampleAndWrite<double>(Foam ::sampledSurfaces::fieldGroup<double>&) in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libsampling.so"
#7 Foam::sampledSurfaces::write() in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libsampling.so"
#8 Foam::OutputFilterFunctionObject<Foam::sampledSurf aces>::execute(bool) in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libsampling.so"
#9 Foam::functionObjectList::execute(bool) in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#10 Foam::Time::run() const in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#11 Foam::Time::loop() in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#12 Foam::simpleControl::loop() in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#13
in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/simpleFoam"
#14 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#15
in "/home/cadnexus/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/simpleFoam"
Floating point exception

mihaipruna April 15, 2012 18:15

Ok, with a finer mesh it's better, no crashes

Time = 10

smoothSolver: Solving for Ux, Initial residual = 0.007497, Final residual = 0.000191026, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.00780401, Final residual = 0.000205816, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.00731843, Final residual = 0.000192019, No Iterations 2
GAMG: Solving for p, Initial residual = 0.0264498, Final residual = 0.0025477, No Iterations 2
time step continuity errors : sum local = 4868.62, global = -409.19, cumulative = -31928.9
smoothSolver: Solving for omega, Initial residual = 0.0062248, Final residual = 0.000119997, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.014408, Final residual = 0.00032159, No Iterations 2
ExecutionTime = 2315.79 s ClockTime = 2320 s


All times are GMT -4. The time now is 21:50.