{
"metadata": {
"name": "",
"signature": "sha256:d8373ce770cb2e77eb51828dedf70fef587bcbc7e1ca4b3f0b1260f16b3cf1a2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# DARPA SUBOFF\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"# Parameters\n",
"\n",
"##Alpha = 0 \n",
"\n",
"##Mach = 0.0107\n",
"\n",
"##Reynolds number = 1.2e07\n",
"\n",
"## References\n",
"\n",
"\n",
"##www.dtic.mil/dtic/tr/fulltext/u2/a210642.pdf/
\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Define case name\n",
"This is the solver case to be analysed"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"case_name = 'v2'"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Define Data Location\n",
"For remote data the interaction will use ssh to securely interact with the data
\n",
"This uses the reverse connection capability in paraview so that the paraview server can be submitted to a job scheduler
\n",
"Note: The default paraview server connection will use port 11111"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"remote_data = True\n",
"\n",
"data_dir='/gpfs/cfms/workarea/projects/hyper_flux/darpa/suboff_simplified'\n",
"data_host='acimpoeru@vis03'\n",
"\n",
"remote_server_auto = True\n",
"\n",
"#paraview_cmd='mpiexec -n 1 ~/apps/Paraview/bin/pvserver --use-offscreen-rendering -rc --client-host=localhost -sp=11113'\n",
"paraview_cmd='mpiexec /gpfs/cfms/apps/bin/pvserver'\n",
"if not remote_server_auto:\n",
" paraview_cmd=None\n",
"\n",
"if not remote_data:\n",
" data_host='localhost'\n",
" paraview_cmd=None"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Initialise Environment"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"%pylab inline\n",
"from paraview.simple import *\n",
"paraview.simple._DisableFirstRenderCameraReset()\n",
"import pylab as pl\n",
"import math\n",
"import numpy as np"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Populating the interactive namespace from numpy and matplotlib\n",
"paraview version 4.2.0-75-gff3f889"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Data Connection\n",
"This starts paraview server on remote host and connects"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from zutil.post import pvserver_connect\n",
"if remote_data:\n",
" pvserver_connect(data_host=data_host,data_dir=data_dir,paraview_cmd=paraview_cmd)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"[acimpoeru@vis03] Executing task 'port_test'\n",
"Selected Port: 12000\n",
"[acimpoeru@vis03] Executing task 'pvserver'\n",
"[acimpoeru@vis03] run: /bin/bash -l -c \"cd /gpfs/cfms/workarea/projects/hyper_flux/darpa/suboff_simplified && sleep 2;mpiexec /gpfs/cfms/apps/bin/pvserver -rc --client-host=localhost -sp=12000\"\n",
"[acimpoeru@vis03] out: \n",
"[acimpoeru@vis03] out: \t\t _____ ______ __ __ _____ \n",
"[acimpoeru@vis03] out: \t\t / ____| ____| \\/ |/ ____|\n",
"[acimpoeru@vis03] out: \t\t | | | |__ | \\ / | (___ \n",
"[acimpoeru@vis03] out: \t\t | | | __| | |\\/| |\\___ \\ \n",
"[acimpoeru@vis03] out: \t\t | |____| | | | | |____) |\n",
"[acimpoeru@vis03] out: \t\t \\_____|_| |_| |_|_____/ \n",
"[acimpoeru@vis03] out: \n",
"[acimpoeru@vis03] out: ++++++++++++++++++++++++++++: System Data :++++++++++++++++++++++++++++\n",
"[acimpoeru@vis03] out: + Hostname = vis03\n",
"[acimpoeru@vis03] out: + Kernel = 2.6.32-358.el6.x86_64\n",
"[acimpoeru@vis03] out: + RHEL Release = Red Hat Enterprise Linux Server release 6.4 (Santiago)\n",
"[acimpoeru@vis03] out: + Uptime = 09:28:41 up 23 days, 23:13, 12 users,\n",
"[acimpoeru@vis03] out: ++++++++++++++++++++++++++++: User Data :++++++++++++++++++++++++++++++\n",
"[acimpoeru@vis03] out: + Username = acimpoeru\n",
"[acimpoeru@vis03] out: +++++++++++++++++++++++: Contact Information :+++++++++++++++++++++++++\n",
"[acimpoeru@vis03] out: + in case of any problems, contact: support@cfms.org.uk\n",
"[acimpoeru@vis03] out: + for feedback, contact: feedback@cfms.org.uk \n",
"[acimpoeru@vis03] out: +++++++++++++++++++++: Maintenance Information :+++++++++++++++++++++++\n",
"[acimpoeru@vis03] out: + There is no planned maintenance taking place this week\n",
"[acimpoeru@vis03] out: +++++: Group Home Directory Quota Usage (updated every 10 mins) +++++\n",
"[acimpoeru@vis03] out: + \n",
"[acimpoeru@vis03] out: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n",
"[acimpoeru@vis03] out: [acimpoeru@vis03] rtunnel: opened reverse tunnel: (u'127.0.0.1', 48202) -> ('172.20.1.25', 22) -> ('localhost', 11111)\n",
"Connecting to client (reverse connection requested)...\n",
"[acimpoeru@vis03] out: Connection URL: csrc://localhost:12000\n",
"[acimpoeru@vis03] out: Client connected.\n",
"[acimpoeru@vis03] out: "
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Get control dictionary"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from zutil.post import get_case_parameters,print_html_parameters\n",
"parameters=get_case_parameters(case_name,data_host=data_host,data_dir=data_dir)"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 5
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Get status file"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from zutil.post import get_status_dict\n",
"status=get_status_dict(case_name,data_host=data_host,data_dir=data_dir)\n",
"num_procs = str(status['num processor'])"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 6
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Define test conditions"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"alpha = 0.0 # degrees\n",
"reference_area = 0.0 # inches^2\n",
"reference_length = 1429.1667 # inches, mean chord. \n",
"reference_span = 0.0 # inches\n",
"from IPython.display import HTML\n",
"HTML(print_html_parameters(parameters))"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"
| pressure | 101715.44 |
| temperature | 304.2611 |
| Reynolds No | 12000000.0 |
| Ref length | 1429.1667 |
| Speed | 0.0 |
| Mach No | 0.0179 |