Closed staneuski closed 5 years ago
Change fvSchemes:
diff --git a/tutorials/multiCompression/RiemannTube/system/fvSchemes b/tutorials/multiCompression/RiemannTube/system/fvSchemes
index 55501e6..d1ad001 100755
--- a/tutorials/multiCompression/RiemannTube/system/fvSchemes
+++ b/tutorials/multiCompression/RiemannTube/system/fvSchemes
@@ -23,11 +23,14 @@ ddtSchemes
gradSchemes
{
default Gauss linear;
+ grad(p) cellLimited Gauss linear 0.9; // UEqn
}
divSchemes
{
- default Gauss linear;
+ default Gauss cubic;
+ div(phi,U) Gauss upwind; // UEqn
+ div(phi,e) Gauss upwind; // eEqn
}
laplacianSchemes
@@ -37,7 +40,7 @@ laplacianSchemes
interpolationSchemes
{
- default linear;
+ default cubic;
}
snGradSchemes
@@ -45,5 +48,4 @@ snGradSchemes
default corrected;
}
And then result will be something like:
Change explicit to implicit for eEqn in the solver [ commit af3371a ]:
--- a/solvers/multiCompression/multiCompression.C
+++ b/solvers/multiCompression/multiCompression.C
@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
fvScalarMatrix eEqn
(
fvm::ddt(rho, e)
- For [**createFields.H**](https://github.com/StasF1/dualFuelEngine/blob/v0.2-alpha/solvers/multiCompression/createFields.H):
```diff
@@ -114,7 +114,21 @@ surfaceScalarField phi
fvc::flux(rho*U)
);
-Info<< "Constructing energy field" << endl;
+wordList eBCTypes
+(
+ U.boundaryField().size(),
+ fixedValueFvPatchScalarField::typeName
+);
+
+forAll(U.boundaryField(), patchi)
+{
+ if (U.boundaryField()[patchi].fixesValue())
+ {
+ eBCTypes[patchi] = zeroGradientFvPatchScalarField::typeName;
+ }
+}
+
+Info<< "Constructing energy field e\n" << endl;
volScalarField e
(
@@ -124,9 +138,10 @@ volScalarField e
runTime.timeName(),
mesh,
IOobject::NO_READ,
- IOobject::NO_WRITE
+ IOobject::AUTO_WRITE
),
- p/(GAMMA - 1)/rho + magSqr(U)/2
+ p/(GAMMA - 1)/rho + magSqr(U)/2,
+ eBCTypes
);
@@ -24,13 +24,20 @@ solvers
tolerance 1e-06;
relTol 0;
}
And then result will be something like:
Я вот заметил: почему справа скорость замирает на нуле (как и положено), а слева - нет? P.S. Лучше б вместо магнитуды скорости строить ux.
@vl-zenkin