]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix bug in energy source term according to Praveen C's report. 546/head
authorQiao Lei <qiaol618@gmail.com>
Fri, 13 Feb 2015 20:20:57 +0000 (14:20 -0600)
committerQiao Lei <qiaol618@gmail.com>
Fri, 13 Feb 2015 20:20:57 +0000 (14:20 -0600)
    The energy source term due to gravity should be rho*g*v=g*momentum.

examples/step-33/step-33.cc

index c3162bed519f8a9512442fa5e98c0cbf08651a70..6ae98203def4c2bc844c91ab08ee645952c684f0 100644 (file)
@@ -314,9 +314,7 @@ namespace Step33
             forcing[c] = gravity * W[density_component];
             break;
           case energy_component:
-            forcing[c] = gravity *
-                         W[density_component] *
-                         W[first_momentum_component+dim-1];
+            forcing[c] = gravity * W[first_momentum_component+dim-1];
             break;
           default:
             forcing[c] = 0;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.