Commit 801f6a1f authored by Alex Breuer's avatar Alex Breuer

Added configs for the 2D San Jacinto test case.

parent cbaf33c6
# Runtime configs of the 2D San Jacinto test case
This directory contains the runtime configurations for the two-dimensional San Jacinto test case.
Used command:
```
node generate_configs.js
```
/**
* @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 runtime configs for the 2D San Jacinto test case.
**/
'use strict';
var nunjucks = require('nunjucks');
var fs = require('fs');
// minimum characteristic lengths
var l_clMin = [30, 40, 50, 75, 100, 200, 300];
var l_recvs = []
// surface receivers
for( var l_loc = -20; l_loc <= 20; l_loc+=1 ) {
l_recvs.push(
{
'name': 'sanjacinto_2d_' + l_loc + '_surf',
'x': l_loc*1000,
'y': 9999
}
)
}
// receivers in depth
for( var l_loc = 0; l_loc >= -20; l_loc-=1 ) {
l_recvs.push(
{
'name': 'sanjacinto_2d_00_' + l_loc,
'x': 0,
'y': l_loc*1000
}
)
}
var l_eqs = [ 'acoustic', 'elastic' ]
var l_velMods = [
// acoustic
{
'lam': '2.5200000000000000E10',
'mu': '0.0'
},
// elastic
{
'lam': '1.7136000000000000E10',
'mu': '4.0320000000000000E9'
}
]
// generate the runtime configs
var l_xml = require('fs-extra')
for( var l_eq = 0; l_eq < 2; l_eq++ ) {
for( var l_cl = 0; l_cl < l_clMin.length; l_cl++ ) {
l_xml.outputFile(
'hom_' + l_eqs[l_eq] + '/sanjacinto_2d_hom_' + l_clMin[l_cl] + '.xml',
nunjucks.render(
'sanjacinto_2d_hom.njk', {
i_mesh: 'meshes/hom/sanjacinto_2d_hom_' + l_clMin[l_cl] + '.msh',
i_velMod: l_velMods[l_eq],
i_source: 'sources/ricker_' + l_eqs[l_eq] + '.nc',
i_recvDir: 'sanjacinto_2d_hom_' + l_eqs[l_eq] + '_' + l_clMin[l_cl],
i_wfBase: 'sanjacinto_2d_hom_' + l_eqs[l_eq] + '_' + l_clMin[l_cl] + '/wf',
i_recvs: l_recvs
}
),
function(l_err) {
if(l_err) return console.log( l_err );
}
)
}
}
\ No newline at end of file
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.
<?xml version="1.0" encoding="UTF-8"?>
<!--
@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
Configuration of the two-dimensional San Jacinto test case.
-->
<edge>
<build>
<element_type>tria3</element_type>
<equations>elastic</equations>
<moab>yes</moab>
</build>
<cfr>
<mesh>
<files>
<in>{{i_mesh}}</in>
</files>
<options>
<read>;</read>
</options>
<boundary>
<free_surface>101</free_surface>
<outflow>105</outflow>
</boundary>
</mesh>
<velocity_model>
<domain>
<half_space>
<origin>
<x>0</x>
<y>9999</y>
</origin>
<normal>
<x> 0</x>
<y>-1</y>
</normal>
</half_space>
<rho>2800</rho>
<lambda>{{ i_velMod.lam }}</lambda>
<mu>{{ i_velMod.mu }}</mu>
</domain>
</velocity_model>
<setups>
<kinematic_sources>
<file>{{ i_source }}</file>
</kinematic_sources>
<end_time>20.0</end_time>
</setups>
<output>
<receivers>
<path_to_dir>{{ i_recvDir }}</path_to_dir>
<freq>0.01</freq>
{% for l_recv in i_recvs %}
<receiver>
<name>{{ l_recv.name }}</name>
<coords>
<x>{{ l_recv.x }}</x>
<y>{{ l_recv.y }}</y>
</coords>
</receiver>
{% endfor %}
</receivers>
<wave_field>
<type>vtk_binary</type>
<file>{{ i_wfBase }}</file>
<int>2.5</int>
</wave_field>
</output>
</cfr>
</edge>
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