CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Accuracy problem (https://www.cfd-online.com/Forums/openfoam-solving/86430-accuracy-problem.html)

 Zato_Ichi March 22, 2011 14:21

Accuracy problem

Hello everyone ! I have a quite strange problem with solving of two equations:

Code:

```fvVectorMatrix uEqn     (         fvm::ddt(U) ==  (fvc::div(sigma) - fvc::grad(p))/rho     );     uEqn.solve() ;         pU = p*U ;         fvScalarMatrix EEqn     (         fvm::ddt(E) == -fvc::div(pU)/rho     );     EEqn.solve() ;```
initial condition for U is uniform (0 0 0) for E uniform 215250, for p i made a step-like distribution with funkySetFields :

Code:

```gap     {     field p;     expression "2e05";     condition "(pos().x)<=(pi)";         keepPatches 1;     }```
Solution domain is one-dimensional with 10000 cells. The problem is that second equation gives that E changes throughout all solution domain with a small fluctuations about e-12, and after each time step this errors accumulates.
Here 1st 100 values of E :

Code:

```215250 215250 215250 215249.999999999971 215250 215250 215250 215249.999999999971 215250 215249.999999999971 215250 215250 215250 215249.999999999971 215250.000000000029 215250 215250 215250 215249.999999999971 215249.999999999971 215249.999999999971 215250 215249.999999999971 215250 215250 215250 215250 215250 215249.999999999971 215250.000000000029 215249.999999999971 215250 215250 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215250 215250 215250 215249.999999999971 215250 215250 215249.999999999971 215250 215249.999999999971 215250 215250 215249.999999999971 215249.999999999971 215250 215250 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215250 215249.999999999971 215250 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215249.999999999971 215250 215250 215250 215250 215249.999999999971 215249.999999999971 215250 215250 215250 215250 215249.999999999971 215250 215250 215249.999999999971 215249.999999999971 215250 215250 215250 215250 215249.999999999971 215249.999999999971 215250 215250 215250 215250 215249.999999999971 215250 215250 215249.999999999971 215250 215249.999999999971```
I use Gauss linear scheme for div(pU) term. I've tried various linear solvers with difference tolerance values, but it doesn't help.

 All times are GMT -4. The time now is 07:27.