Skip to content

Commit

Permalink
Replace advect_upwind with advect_van_leer in channel flow demos.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 455186003
  • Loading branch information
pnorgaard authored and JAX-CFD authors committed Jun 15, 2022
1 parent 3bf2905 commit c059a3f
Showing 1 changed file with 27 additions and 37 deletions.
64 changes: 27 additions & 37 deletions notebooks/channel_flow_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"metadata": {
"executionInfo": {
"elapsed": 30765,
"elapsed": 5628,
"status": "ok",
"timestamp": 1650291342663,
"timestamp": 1655317705710,
"user": {
"displayName": "",
"userId": ""
Expand All @@ -40,12 +40,12 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"metadata": {
"executionInfo": {
"elapsed": 6694,
"elapsed": 5028,
"status": "ok",
"timestamp": 1650291354614,
"timestamp": 1655317714655,
"user": {
"displayName": "",
"userId": ""
Expand Down Expand Up @@ -94,12 +94,12 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"metadata": {
"executionInfo": {
"elapsed": 3,
"elapsed": 2,
"status": "ok",
"timestamp": 1650291354778,
"timestamp": 1655317720089,
"user": {
"displayName": "",
"userId": ""
Expand All @@ -123,28 +123,28 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {
"executionInfo": {
"elapsed": 11473,
"elapsed": 12362,
"status": "ok",
"timestamp": 1650291366412,
"timestamp": 1655317733789,
"user": {
"displayName": "",
"userId": ""
},
"user_tz": 420
},
"id": "_5YttC-TVxk1",
"outputId": "1762c8f5-aa2c-4b9b-dffa-3f30c3f2f80b"
"outputId": "b4e346c5-365c-48fc-e946-5957872f9ea1"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 1.83 s, sys: 83.1 ms, total: 1.91 s\n",
"Wall time: 11.3 s\n"
"CPU times: user 9.42 s, sys: 2.9 s, total: 12.3 s\n",
"Wall time: 12.3 s\n"
]
}
],
Expand All @@ -158,7 +158,7 @@
"# TODO(pnorgaard): Fix Van-Leer limiters for Dirichlet velocity BC \n",
"def convect(v):\n",
" return tuple(\n",
" cfd.advection.advect_upwind(u, v, dt) for u in v)\n",
" cfd.advection.advect_van_leer(u, v, dt) for u in v)\n",
" \n",
"# Define a step function and use it to compute a trajectory.\n",
"step_fn = cfd.funcutils.repeated(\n",
Expand All @@ -180,23 +180,23 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 8,
"metadata": {
"colab": {
"height": 479
"height": 573
},
"executionInfo": {
"elapsed": 1775,
"elapsed": 1812,
"status": "ok",
"timestamp": 1650291368319,
"timestamp": 1655317762576,
"user": {
"displayName": "",
"userId": ""
},
"user_tz": 420
},
"id": "htvk6BN2XB-H",
"outputId": "2d519025-f014-42cb-e2f6-850cf3757154"
"outputId": "6c383e03-538f-491d-d772-ca1d761b1e8f"
},
"outputs": [
{
Expand Down Expand Up @@ -231,23 +231,23 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {
"colab": {
"height": 295
},
"executionInfo": {
"elapsed": 469,
"elapsed": 392,
"status": "ok",
"timestamp": 1650291368936,
"timestamp": 1655317767581,
"user": {
"displayName": "",
"userId": ""
},
"user_tz": 420
},
"id": "8V5D8pXRV-8Y",
"outputId": "c9b3deb5-4a64-473a-c95e-afa698ff5ff5"
"outputId": "1dca792a-b2ba-4ddb-9835-2abe11b185ea"
},
"outputs": [
{
Expand All @@ -270,18 +270,8 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"executionInfo": {
"elapsed": 59,
"status": "ok",
"timestamp": 1650291369164,
"user": {
"displayName": "",
"userId": ""
},
"user_tz": 420
},
"id": "kS4FNx0cPiVA"
},
"outputs": [],
Expand All @@ -294,7 +284,7 @@
"colab": {
"collapsed_sections": [],
"last_runtime": {
"build_target": "//learning/deepmind/dm_python:dm_notebook3_tpu",
"build_target": "//learning/deepmind/public/tools/ml_python:ml_notebook",
"kind": "private"
},
"name": "JAX-CFD channel flow demo.ipynb",
Expand Down

0 comments on commit c059a3f

Please sign in to comment.