wyldckat |
February 22, 2014 11:54 |
1 Attachment(s)
Hi Luca,
Attached is a working case, albeit not realistic at all. I simply took a hammer, a few nails and made it work without wobling :D
This is the whole list of changes made... but very cryptic looking, aren't they:
Code:
diff -Nur Prova/0/T.org Prova2/0/T.org
--- Prova/0/T.org 2014-02-16 21:33:08.000000000 +0000
+++ Prova2/0/T.org 2014-02-22 16:28:44.768521049 +0000
@@ -22,11 +22,10 @@
{
floor
{
- type compressible::turbulentHeatFluxTemperature;
+ type turbulentHeatFluxTemperature;
heatSource flux;
q uniform 10;
- kappa fluidThermo;
- kappaName fluidThermo;
+ alphaEff alphat;
value uniform 305;
}
ceiling
diff -Nur Prova/constant/transportProperties Prova2/constant/transportProperties
--- Prova/constant/transportProperties 2014-02-16 20:55:43.000000000 +0000
+++ Prova2/constant/transportProperties 2014-02-22 16:30:03.320518263 +0000
@@ -21,6 +21,7 @@
TRef TRef [0 0 0 1 0 0 0] 298;
Pr Pr [0 0 0 0 0 0 0] 0.73;
Prt Prt [0 0 0 0 0 0 0] 0.85;
+Cp0 1.3;
CrossPowerLawCoeffs
{
diff -Nur Prova/system/fvSchemes Prova2/system/fvSchemes
--- Prova/system/fvSchemes 2014-02-16 21:26:43.000000000 +0000
+++ Prova2/system/fvSchemes 2014-02-22 16:38:19.752500655 +0000
@@ -16,42 +16,40 @@
ddtSchemes
{
- default Euler;
+ default steadyState;
}
gradSchemes
{
default Gauss linear;
- grad(p) Gauss linear;
- grad(U) Gauss linear;
}
divSchemes
{
- default none;
- div(phi,U) Gauss linearUpwind Gauss;
- div(phi,k) Gauss upwind;
- div(phi,epsilon) Gauss upwind;
- div(phi,omega) Gauss upwind;
- div((muEff*dev(T(grad(U))))) Gauss linear;
+ default none;
+ div(phi,U) bounded Gauss upwind;
+ div(phi,T) bounded Gauss upwind;
+ div(phi,k) bounded Gauss upwind;
+ div(phi,epsilon) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
+ div(phi,omega) bounded 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(DomegaEff,omega) Gauss linear corrected;
- laplacian(DepsilonEff,epsilon) Gauss linear corrected;
- laplacian(1,p) Gauss linear corrected;
+ default none;
+ laplacian(nuEff,U) Gauss linear corrected;
+ laplacian(Dp,p_rgh) Gauss linear corrected;
+ laplacian(alphaEff,T) Gauss linear corrected;
+ laplacian(DkEff,k) Gauss linear corrected;
+ laplacian(DepsilonEff,epsilon) Gauss linear corrected;
+ laplacian(DREff,R) Gauss linear corrected;
+ laplacian(DomegaEff,omega) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
- interpolate(U) linear;
}
snGradSchemes
@@ -62,7 +60,7 @@
fluxRequired
{
default no;
- p;
+ p_rgh ;
}
// ************************************************************************* //
diff -Nur Prova/system/fvSolution Prova2/system/fvSolution
--- Prova/system/fvSolution 2014-02-16 21:24:56.000000000 +0000
+++ Prova2/system/fvSolution 2014-02-22 16:36:54.124503691 +0000
@@ -24,58 +24,52 @@
solvers
{
-
- p PCG
+ p_rgh
{
- maxIter 1000;
- preconditioner DIC;
- tolerance 1e-06;
- relTol 0;
- };
+ solver PCG;
+ preconditioner DIC;
+ tolerance 1e-08;
+ relTol 0.01;
+ }
- U PBiCG
- {
- preconditioner DILU;
- tolerance 1e-05;
- relTol 0;
- };
- k PBiCG
- {
- preconditioner DILU;
- tolerance 1e-05;
- relTol 0;
- };
- omega PBiCG
+ "(U|T|k|epsilon|R|omega)"
{
- preconditioner DILU;
- tolerance 1e-05;
- relTol 0;
- };
- epsilon PBiCG
- {
- preconditioner DILU;
- tolerance 1e-05;
- relTol 0;
- };
-
+ solver PBiCG;
+ preconditioner DILU;
+ tolerance 1e-05;
+ relTol 0.1;
+ }
}
SIMPLE
{
- nNonOrthogonalCorrectors 2;
-pRefCell 0;
- pRefValue 0;
+ nNonOrthogonalCorrectors 0;
+ pRefCell 0;
+ pRefValue 0;
+ residualControl
+ {
+ p_rgh 1e-2;
+ U 1e-4;
+ T 1e-2;
+
+ // possibly check turbulence fields
+ "(k|epsilon|omega)" 1e-3;
+ }
}
relaxationFactors
{
- p 0.3;
- U 0.7;
- k 0.7;
- epsilon 0.7;
- omega 0.7;
+ fields
+ {
+ p_rgh 0.7;
+ }
+ equations
+ {
+ U 0.3;
+ T 0.5;
+ "(k|epsilon|R)" 0.7;
+ }
}
-
// ************************************************************************* //
Essentially, what I've done was:
- Looked into the source code for the boundary condition "compressible::turbulentHeatFluxTemperature". Guess what, this boundary condition cannot be used with the solver buoyantBoussinesqSimpleFoam, because it's an incompressible solver with the Boussinesq approximation for buoyancy.
- So I switched to the incompressible BC "turbulentHeatFluxTemperature":
Code:
floor
{
type turbulentHeatFluxTemperature;
heatSource flux;
q uniform 10;
alphaEff alphat;
value uniform 305;
}
- Had to add the entry "Cp0" to the file "constant/transportProperties". The value I used is completely random. You'll have to define the correct one for your own case.
- Configured the files "system/fvSchemes" and "system/fvSolution" based on the tutorial "heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/" and added in the entries that the solver complained about.
Note: The solver crashes after 400 and something iterations, because the temperature goes well beyond the 15 degree Celsius that the Boussinesq approximation allows for.
Best regards,
Bruno
|