Commit 6235656a authored by Alex Breuer's avatar Alex Breuer

Added meshes for 2D San Jacinto test case.

parent 801f6a1f
......@@ -4,7 +4,7 @@ This directory contains the extracted 2D topo-file, the extracted surface profil
## Grid Projection and 2D cut
* Used grid:1/3rd arc-second Digital Elevation Models (DEMs) - USGS National Map 3DEP, https://www.sciencebase.gov/catalog/item/4f70aa9fe4b058caae3f8de5
Commands:
* Commands:
```
wget https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/ArcGrid/USGS_NED_13_n34w117_ArcGrid.zip
wget https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/ArcGrid/USGS_NED_13_n34w118_ArcGrid.zip
......@@ -21,10 +21,11 @@ mv USGS_NED* grids
bash project_extract.sh 2>&1 | tee project_extract.sh.log
```
Remark: Only the final processed grid is shared.
Remark 1: Only the final processed grid is shared.
Remark 2: GMT translates the map projection `-Jtmerc/-116.679438/33.814712/0.9996` to the proj.4 string `+proj=tmerc +lat_0=33.814712 +lon_0=-116.679438 +k=1 +x_0=0 +y_0=0 +a=6378137.000 +b=6356752.314245 +ellps=WGS84 +datum=WGS84 +units=m +no_defs`, ignoring our desired input for `k`. Once GMT6 is released we should be able to directly use proj.4 strings.
# 1D Extraction
EDGE version:
* EDGE version:
```
commit 77895a4b528a2f9033c34c314096c62ff0d84b8f
Author: Alexander Nikolas Breuer <anbreuer@ucsd.edu>
......@@ -33,7 +34,13 @@ Date: Thu Jul 12 14:31:30 2018 -0700
Added script for the extraction of elevation profiles from a DEM.
```
Command:
* Command:
```
elevation_profile.py --dem topo.nc --left -17677.67 -17677.67 --right 17677.67 17677.67 --sponge 25000 --sampling 10 100 --depth -50000 --offset -50000 0 --output topo_1d.csv topo_1d.geo 2>&1 | tee elevation_profile.py.log
```
# Mesh Generation
```
mkdir hom
node generate_configs.js
bash generate_meshes.sh
```
\ No newline at end of file
/**
* @file This file is part of EDGE.
*
* @author Alexander Breuer (anbreuer AT ucsd.edu)
*
* @section LICENSE
* Copyright (c) 2018, Regents of the University of California
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
* Generates the mesh configs for the 2D San Jacinto test case.
**/
'use strict';
var nunjucks = require('nunjucks');
var fs = require('fs');
// minimum characteristic length
var l_clMin = [30, 40, 50, 75, 100, 200, 300];
/*
* Configs for the forward simulations.
*/
var l_cls = []
for( var l_cl = 0; l_cl < l_clMin.length; l_cl++ ) {
// assemble characteristic lengths
l_cls.push(
{
'topo_roi': l_clMin[l_cl],
'topo_sponge': l_clMin[l_cl]*3,
'source': l_clMin[l_cl],
'roi': l_clMin[l_cl]*2,
'sponge': l_clMin[l_cl]*4
} );
}
// generate the configs
var l_xml = require('fs')
for( var l_cl = 0; l_cl < l_clMin.length; l_cl++ ) {
l_xml.writeFile(
"hom/sanjacinto_2d_hom_" + l_clMin[l_cl] + ".geo",
nunjucks.render(
'sanjacinto_2d_hom.njk', {
i_cls: l_cls[l_cl]
}
),
function(l_err) {
if(l_err) return console.log( l_err );
}
)
}
\ No newline at end of file
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (anbreuer AT ucsd.edu)
#
# @section LICENSE
# Copyright (c) 2018, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @section DESCRIPTION
# Generates the 2D meshes.
##
cd hom
for msh in 300 200 100 75 50 40 30
do
echo "$(date) generating ${msh}"
gmsh -2 sanjacinto_2d_hom_${msh}.geo > sanjacinto_2d_hom_${msh}.msh.log
tar -cvjSf sanjacinto_2d_hom_${msh}.msh.tar.bz2 sanjacinto_2d_hom_${msh}.msh
done
cd ..
\ No newline at end of file
*.geo filter=lfs diff=lfs merge=lfs -text
[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/)
To the extent possible under law, [Alexander Nikolas Breuer](http://dial3343.org) has waived all copyright and related or neighboring rights to the following work:
* `sanjacinto_2d_hom_30.msh.tar.bz2`
* `sanjacinto_2d_hom_40.msh.tar.bz2`
* `sanjacinto_2d_hom_50.msh.tar.bz2`
* `sanjacinto_2d_hom_75.msh.tar.bz2`
* `sanjacinto_2d_hom_100.msh.tar.bz2`
* `sanjacinto_2d_hom_200.msh.tar.bz2`
* `sanjacinto_2d_hom_300.msh.tar.bz2`
This work is published from: United States.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
/**
* @file This file is part of EDGE.
*
* @author Alexander Breuer (anbreuer AT ucsd.edu)
*
* @section LICENSE
* Copyright (c) 2018, Regents of the University of California
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
* Template the homogeneous 2D San Jacinto test case.
**/
cl_topo_roi = {{i_cls.topo_roi}};
cl_topo_sponge = {{i_cls.topo_sponge}};
cl_source = {{i_cls.source}};
cl_roi = {{i_cls.roi}};
cl_sponge = {{i_cls.sponge}};
Include "../sanjacinto_2d_hom_base.geo";
/**
* @file This file is part of EDGE.
*
* @author Alexander Breuer (anbreuer AT ucsd.edu)
*
* @section LICENSE
* Copyright (c) 2018, Regents of the University of California
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @section DESCRIPTION
* Mesh specification for the homogeneous 2D San Jacinto test case.
**/
Mesh.Algorithm = 6; // frontal
// import the generated 1d topography
Include "topo_1d.geo";
// assign boundary conditions
Physical Line(101) = {0};
Physical Line(105) = {1:3};
// define simulation area
Line Loop (1) = {0:3};
Plane Surface(1) = {1};
Physical Surface(1) = {1};
// define topo size field
Field[1] = Attractor;
Field[1].EdgesList = {0};
Field[1].NNodesByEdge = 25000;
Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = cl_topo_roi;
Field[2].LcMax = cl_sponge;
Field[2].DistMin = 0;
Field[2].DistMax = 1000;
Field[3] = Box;
Field[3].VIn = 0.1;
Field[3].VOut = cl_topo_sponge;
Field[3].XMin = -25000;
Field[3].XMax = 25000;
Field[3].YMin = -1000;
Field[3].YMax = 9999;
Field[4] = Max;
Field[4].FieldsList = {2,3};
// add attractor to source
Point(0) = { 0, -1000, cl_source };
Field[5] = Attractor;
Field[5].NodesList = {0};
Field[6] = Threshold;
Field[6].IField = 5;
Field[6].LcMin = cl_source;
Field[6].LcMax = cl_sponge;
Field[6].DistMin = 0;
Field[6].DistMax = 25000;
// add region of interest, rest is sponge
Field[7] = Ball;
Field[7].VIn = cl_roi;
Field[7].VOut = cl_sponge;
Field[7].XCenter = 0;
Field[7].YCenter = -1000;
Field[7].Radius = 25000;
Field[8] = Min;
Field[8].FieldsList = {4,6,7};
Background Field = 8;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment