{
"metadata": {
"name": "",
"signature": "sha256:f91467d828bdd2d80a3f4d68cad15e50a32168ea12ff6d4382edff99bbba4c87"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2nd High Lift Prediction Workshop \n",
"\n",
"#### Alpha = 7deg , Re = 15E+06 , DLR - F11 configuration
\n",
"\n",
"\n",
"![2ndHLPW](http://hiliftpw.larc.nasa.gov/Images/f11-piv-lswt-b.jpg) \n",
"\n",
"\n",
"#### References\n",
"\n",
"High Lift Workshop\n",
"\n",
"\n",
" \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 = 'a_c1c2_c'"
],
"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",
"data_dir='/gpfs/cfms/workarea/projects/hyper_flux/high_lift/cas2_config4_v2'\n",
"\n",
"data_host='jappa@vis03'\n",
"\n",
"remote_server_auto = True\n",
"\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": [
"[jappa@vis03] Executing task 'port_test'\n",
"[jappa@vis03] Executing task 'port_test'\n",
"Selected Port: 12001\n",
"[jappa@vis03] Executing task 'pvserver'\n",
"[jappa@vis03] run: /bin/bash -l -c \"cd /gpfs/cfms/workarea/projects/hyper_flux/high_lift/cas2_config4_v2 && sleep 2;mpiexec /gpfs/cfms/apps/bin/pvserver -rc --client-host=localhost -sp=12001\"\n",
"[jappa@vis03] out: \n",
"[jappa@vis03] out: \t\t _____ ______ __ __ _____ \n",
"[jappa@vis03] out: \t\t / ____| ____| \\/ |/ ____|\n",
"[jappa@vis03] out: \t\t | | | |__ | \\ / | (___ \n",
"[jappa@vis03] out: \t\t | | | __| | |\\/| |\\___ \\ \n",
"[jappa@vis03] out: \t\t | |____| | | | | |____) |\n",
"[jappa@vis03] out: \t\t \\_____|_| |_| |_|_____/ \n",
"[jappa@vis03] out: \n",
"[jappa@vis03] out: \n",
"[jappa@vis03] out: \n",
"[jappa@vis03] out: ++++++++++++++++++++++++++++: System Data :++++++++++++++++++++++++++++\n",
"[jappa@vis03] out: + Hostname = vis03\n",
"[jappa@vis03] out: + Kernel = 2.6.32-358.el6.x86_64\n",
"[jappa@vis03] out: + RHEL Release = Red Hat Enterprise Linux Server release 6.4 (Santiago)\n",
"[jappa@vis03] out: + Uptime = 08:49:12 up 6 days, 22:33, 9 users,\n",
"[jappa@vis03] out: + CPU = 2x Intel Xeon X5570 @ 2.93GHz\n",
"[jappa@vis03] out: + Memory = 132148768 kB\n",
"[jappa@vis03] out: ++++++++++++++++++++++++++++: User Data :++++++++++++++++++++++++++++++\n",
"[jappa@vis03] out: + Username = jappa\n",
"[jappa@vis03] out: +++++++++++++++++++++++: Contact Information :+++++++++++++++++++++++++\n",
"[jappa@vis03] out: + in case of any problems, contact: support@cfms.org.uk\n",
"[jappa@vis03] out: + for feedback, contact: feedback@cfms.org.uk \n",
"[jappa@vis03] out: +++++++++++++++++++++: Maintenance Information :+++++++++++++++++++++++\n",
"[jappa@vis03] out: + There is no planned maintenance taking place this week\n",
"[jappa@vis03] out: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n",
"[jappa@vis03] out: \n",
"[jappa@vis03] out: Reported: 1 (out of 1) daemons - 1 (out of 1) procs\n",
"[jappa@vis03] out: Warning: Conflicting CPU frequencies detected, using: 3059.000000.\n",
"[jappa@vis03] out: [jappa@vis03] rtunnel: opened reverse tunnel: (u'127.0.0.1', 36894) -> ('172.20.1.25', 22) -> ('localhost', 11111)\n",
"Connecting to client (reverse connection requested)...\n",
"[jappa@vis03] out: Connection URL: csrc://localhost:12001\n",
"[jappa@vis03] out: Client connected.\n",
"[jappa@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 - ETW experiment"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from IPython.display import HTML\n",
"HTML(print_html_parameters(parameters))"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"
pressure | 295000.0 |
temperature | 114.0 |
Reynolds No | 15100000.0 |
Ref length | 347.09 |
Speed | 0.0 |
Mach No | 0.175 |