gprMax V3使用说明

所需积分/C币:12 2019-04-15 13:53:17 3.78MB PDF

gprMax V3使用说明 详细介绍了gprMax V3的各项功能及使用注意事项
1 Getting started 1.1 What is gprA 1.2 Package overview 1.3 nstallation 1. 4 Running gprMax 1.5 Installation for developers 2 Software features 2. 1 What's new/changed? 7 2 Key featu 3 Guidance on GPR modelling 3 3.1 Basic concepts 2 Coordinate system and conventions · 3.3 Spatial discretisation 16 3.4 Absorbing boundary conditions 4 Input file commands 9 4.1 Essential command 20 4.2 General commands 4.3 Material commands 23 4. 4 Object construction comnands 4.5 Source and output commands 4.6 PML commands 36 5 Geometry and Snapshot files 5.1 Geometry files 37 5.2 Snapshot files 39 6 Output file 41 6.1 File structure 6.2 Viewing output 43 7 Plotting 45 7.I A-scans 7.2 B-scans 7.3 Antenna parameters 7. 4 Built-in waveforms 46 8 File utilitie 53 8.1 inputfile_old 2new.py 8.2 outputfiles_ merge.py 53 g Python scripting 55 9.1 Constants/variables 9. 2 Antenna models 55 9.3 Functions for input commands 56 10 Parallelism-OpenMP/MPI 10.1 OpenMP 59 10.2MPI, 10.3 HPC job scripts .59 ll Introductory/basic 2D models 63 11. I A-scan from a metal cylinder 11.2 B-scan from a metal cylinder .67 12 Antenna models 12.1 Wire dipole antenna model 12.2 Bowtie antenna model 71 12. 3 B-scan with a bowlie antenna nodel 13 Advanced modelling 77 13.1 Building a heterogeneous soil 77 14 FAQS 81 15 Screencasts 15.1 Installation ..83 16 Analytical comparisons 85 16. I Hertzian dipole in free space 17 Numerical comparisons 87 17.1 FDTD/MOM 87 1 8 References Bibliography 91 Python Module Index 93 CHAPTER Getting Started 1.1 What is gpr Max? gprmax(htTp://www.gprmax.com)isfreesoftwarethatsimulateselectromagneticwavepropagationItsolves Maxwells equations in 3D using the Finite-Difference Time-Domain(FDTD)method. gprMax was designed for modelling Ground Penetrating Radar(gpr) but can also be used to model electromagnetic wave propagation for many other applications gprmaxisreleasedunderthegnugEneralPublicLicensev3orhigher(http://www.gnu.org/copyleft/gpl.html) gprmaxiswritteninPython3(https://www.python.org)andincludesperformance-criticalpartswriltenin Cython/openmp(http:/cython.org 1.1.1 Using gprMax? Cite us If you use gprMax and publish your work we would be grateful if you could cite gprMax using the following references Warren, C, Giannopoulos, A,& giannakis I.(2015). An advanced GPR modelling framework the next generation of gprMax, In Proc. 8th Int. Workshop Advanced Ground Penetrating Radar (http://dx.doi.org/10.1109/twagpr.2015.7292621) Giannopoulos, A. (2005). Modelling ground penetrating radar by GprMax, Construction and Building Materials19(10),755-762(http://dx.doi.org/10.1016/j.conbuildmat.2005.06.007 1.2 Package overview gprMax/ conda_ env. yml gprMax L工 ENSE README. rst setup. Py tests/ tools user libs/ user modes/ conda_ env, ym. l is a configuration file for Anaconda(miniconda) that sets up a Python environment with all the required Python packages for gprMax docs contains source files for the User Guide. The User Guide is written using re StructuredText (http://docutils.sourceforge.net/rst.htmi)markup,andisbuiltusingSphinx(http://sphinx-doc.org)andread theDocs(https://readthedocs.org gprMax User Guide, Release 3.0.0b20 gprMax is the main package. Within this package the main module is gprMax.py LICENSE contains information on the Gnu General Public License v3 or higher (http://www.gnu.org/copyleft/gpl.html) README. rst contains getting started information on installation, usage, and new features/changes setup. py is used to compile the Cython extension modules test s is a sub-package which contains test modules and input files tools is a sub-package which contains scripts to assist with viewing and post-processing output from mode user libs is a sub-package where useful modules contributed by users are stored. user_models is a sub-package where useful input files contributed by users are stored 1.3 Installation You should use the following guidance to install gprMax if you are an end-user (i.e. you don t intend to develop or contribute to the softw are). Developers(or those intending to use gprMax in a HPC environment) should followtheInstallationfordeveloperssection(http://docs.gprmax.com/en/latest/includereadme.html#installation for-developers) The steps are 1. Get the code 2. Install Python and required Python packages 3. Microsoft Windows only) Install c libraries 1.3.1 1. Get the code Downloadthecodefromhttps:/github.com/gprmax/gprmax Click on Releases from the top header and choose the release you want (latest is at the top Download zip files of the source code and binary extensions for your platform, windows-32bit for 32-bit or windows-64bit for 64-bit versions of microsoft windows linux-64bit for 64-bit versions of linux, or macosx-64bit for 64-bit versions of Mac Os X Expand both zip files and copy the contents of the windows-32bit, windows-64bit linux-64bit or macosx-64bit directory into the gprMax-v.XY. Z/ gprMax directory 1.3.2 2. Install Python and required Python packages We recommend using Miniconda to install Python and the required Python packages for gprMax in a self- contained Python environment. Miniconda is a mini version of Anaconda which is a completely free Python distribution (including for commercial use and redistribution ). It includes more than 300 of the most popular Python packages for science, math, engineering, and data analysis. InstallthePython3.5versionofMinicondaforyourplatforim(http://conda.pydata.org/miniconda.html) Open a Terminal (linux/Mac os X) or Command Prompt (Windows)and navigate into the top-level gprMax director Update conda conda update corda Create an environment(using the supplied conda_env. yml environment file) for gprMax with all the necessary Python packages conda env create -f conda__env. ym_ 2 Chapter 1. Getting Started gprMax User Guide, Release 3.0.0b20 Activate the new environment source activate gprMax Linux/Mac os X)or activate cprMax(windows) Note When you are finished using gprMax the Miniconda environment can be deactivated using source deactivate (Linux/Mac os X or deactivate(windows) If you want to install Python and the required Python packages manually, i.e. without using Ana conda/Miniconda, look in the conda_erv yml file for a list of the requirements 1.3.3 3(Microsoft Windows only)Install C libraries Install the Microsoft Visual Studio 2015 C++ Redistributable (vc redis=x86.exe for32-bitorvcredistx64.exefor64-bit)fromhttps://www.microsoftcom/en us/download/details. aspx? id=48145 You are now ready to proceed to running gprMax. 1.4 Running gprMax Open a Terminal (Linux/Mac os X)or Command Prompt (Windows)and navigate into the top-level gprMax directory If it is not already active, activate the gprMax Miniconda environment (Linux/Mac os X)source activate gprMax or (Windows)activate gprMax gprMax in designed as a Python package, i.e. a namespace which can contain multiple packages and modules, much like a directory. Basic usage is python -m gprMax path_to/name_of_input_file For example to run one of the test models python -m gprMax user_models/cylinder_Ascan_2D. in When the simulation is complete you can plot the A-scan usin python -m toos plot_ Ascan user_models/cylinder_ Ascan_2D.out Your results should like those from the A-scan from a metal cylinder example in introductory/basic 2D models section(http://docs.gprmax.com/en/latest/examples_simple_2d.htmlffview-the-results) 1.4.1 Optional command line arguments There are optional comnand line arguments for gprMax . --geometry-only will build a model and produce any geometry views but will not run the simulation This option is useful for checking the geometry of the model is correct n is used along with a integer number to specify the number of times to run the input file. This option can be used to run a series of models, e.g. to create a B-scan that uses an antenna model. mpi is a fag to turn on Message Passing Interface(MPI) task farm functionality. This option is most usefully combined with -n to allow individual Models to be farmed out using MPI. For further de- tailsseetheParallelperformancesection(http://docs.gprmax.com/en/latest/openmp_mpi.html#parallelism openmo-mDi write python will write an input file after any Python code blocks in the original input file have been processed. 1.4. Running gprMax gprMax User Guide, Release 3.0.0b20 or--he lp can be used to get help on command line options For example, to check the geometry of a model python -m gprMax uscr models/heterogenecus soil in --geometry-onl For example, to run a B-scan with 60 traces python m gprMax ser_models/cylinder__Bscan_2D in-n E0 1.5 Installation for developers Those that are interested in developing or contributing to gprMax should use the following installation guidance I. Get the code 2. Install Python and required Python packages 3. Install a C compiler which supports OpenMP 4. Compile the Cython extensions 1.5.1 1. Get the code UseGit(https://git-scm.com)andclonethemasterbranchoftherepositorygitclone https://github.com/gprmax/gprmax.git 1.5.2 2. Install Python and required Python packages We recommend using Miniconda to install Python and the required Python packages for gprMax in a self- contained Python environment. Miniconda is a mini version of Anaconda which is a completely free Python distribution (including for commercial use and redistribution). It includes more than 300 of the most popular Python packages for science, math, engineering, and data anal ysis. InstallthePython3.5versionofMinicondaforyourplatform(http://conda.pydata.org/minicondahtml) Followtheinstructions(http://conda.pydata.org/docs/install/quick.html)ifyouarehavinganytrouble Open a Terminal (L inux/Mac os X)or Command Prompt (Windows) and navigate into the top-level gprMax directory Update conda conda update corda Create an environment (using the supplied environment file)for gprMax with all the necessary Python packages conda env create -f conda env. yml Activate the new environment (Linux/Mac os X source activate gprMax or (Windows) activate gprMax Note: When you are finished using gprMax the miniconda environment can be deactivated using ( Linux/Mac os X)source deactivate or(Windows deactivate 1.5.3 3. Install a C compiler which supports OpenMP Linux gcc(https://gcc.gnuorgshouldbealreadyinstalledsonoactionisrequired Chapter 1. Getting Started gprMax User Guide, Release 3.0.0b20 Mac OS x gcc(https:/gcc.gnu.org)iseasilyinstalledusingtheHomebrewpackagemanager(http://brew.sh)brew install gcc --without-multillb Note: Installations of Xcode on Mac Os X come with the llvM(clang) compiler, but it does not currently support OpenMP, so you must install gcc Microsoft windows Download and install Microsoft VⅤ isual Studio 2015 Community (https://www.visualstudio.com/downloads/download-visual-studio-vs),whichisfreeDoacustom install and make sure 'programming languages Visual C++ICommon Tools for Visual C++ 2015' is selected, no other options are required 1.5.4 4. Compile the Cython extensions Once you have installed the aforementioned tools follow these steps to build the cython extension modules for gprMax 1. Open a Terminal (Linux/Mac os X) or Command Prompt (Windows) and navigate into the top-level gprMax directory 2. Compile the Cython extension modules using: python setup. py build_ext i l ace. You should see a set of. c source files and a set of. so(Linux/Mac Os X)or. pyd(windows)compiled module files inside the gprMax directory Note: If you want to remove/clean Cython generated files, e. g. before rebuilding the Cython extensions, you can use python setup. py cleanall You are now ready to proceed to running gprMax. 1.5. Installation for developers 5 gprMax User Guide, Release 3.0.0b20 Vis Isual studIo Community 2015 with Update 1 Select features a Programming Languages Visual c Common tools for visual c++2015 Microsoft Foundation classes for c++ Windows XP Support for C+ Visual ft Python Tools for Visual Studio(December 2015) bb> Windows and Web Development Cross Platform Mobile Development Common tools Select al Reset defaults Setup requires up to 10 GB across all drives. Back Next Fig. I 1: Screenshot of Microsoft Visual Studio 2015 Community custom install settings 6 Chapter 1. Getting Started

...展开详情
img
xhlijinlong
  • 分享精英

    成功上传11个资源即可获取

关注 私信 TA的资源

上传资源赚积分,得勋章
    最新推荐