[aspect-devel] boundary velocity function expressions

Payman Janbakhsh payman.janbakhsh at mail.utoronto.ca
Tue Oct 11 10:43:33 PDT 2016


Thanks John
On the scratch cluster that I work  every 3 months they purge unused files, and I had never used any of test files, so didn’t even notice they were gone☺
Thanks again

payman

From: Aspect-devel [mailto:aspect-devel-bounces at geodynamics.org] On Behalf Of John Naliboff
Sent: October 11, 2016 1:28 PM
To: aspect-devel at geodynamics.org
Subject: Re: [aspect-devel] boundary velocity function expressions

Hi Payman,

A tip for locating files in unix … you can use the “find” command to locate files based on all or part of a file name.  The commands below were entered from the main ASPECT folder:
               jbnaliboff >> find . -name "lithosphere_boundary_indicator"
               ./tests/lithosphere_boundary_indicator
This indicates that the relevant file is in the “tests” folder.

The “grep” command is also quite useful for determining what files contain a certain string pattern.  For example, if you want to find files that contain the string “two_merged_boxes” in the “source” directory:
jbnaliboff >> grep -r "two_merged_boxes" source/
source//boundary_composition/two_merged_boxes.cc:#include <aspect/boundary_composition/two_merged_boxes.h>
source//boundary_composition/two_merged_boxes.cc:#include <aspect/geometry_model/two_merged_boxes.h>
source//boundary_temperature/two_merged_boxes.cc:#include <aspect/boundary_temperature/two_merged_boxes.h>
source//boundary_temperature/two_merged_boxes.cc:#include <aspect/geometry_model/two_merged_boxes.h>
source//geometry_model/two_merged_boxes.cc:#include <aspect/geometry_model/two_merged_boxes.h>
jbnaliboff >>

The output above shows that the string “two_merged_boxes” appears 5 times in the file two_merged_boxes.cc.

I highly recommend doing some online tutorials on the “find” and “grep” commands, which can make your daily workflow significantly more efficient.

Cheers,
John

*************************************************
John Naliboff
Assistant Project Scientist, CIG
Earth & Planetary Sciences Dept., UC Davis





On Oct 11, 2016, at 8:41 AM, Payman Janbakhsh <payman.janbakhsh at mail.utoronto.ca<mailto:payman.janbakhsh at mail.utoronto.ca>> wrote:

Found it,
Many Thanks

payman

From: Aspect-devel [mailto:aspect-devel-bounces at geodynamics.org] On Behalf Of Glerum, A.C. (Anne)
Sent: October 11, 2016 11:31 AM
To: aspect-devel at geodynamics.org<mailto:aspect-devel at geodynamics.org>
Subject: Re: [aspect-devel] boundary velocity function expressions

Hi Payman,

The input files are in the “tests” directory. So they’re only small models, but they should show you how to use to geometry.

Cheers,

Anne

On 11 Oct 2016, at 16:53, Payman Janbakhsh <payman.janbakhsh at mail.utoronto.ca<mailto:payman.janbakhsh at mail.utoronto.ca>> wrote:

Hi Anne,
Can you point out where “lithosphere_boundary_indicator.prm” or other related examples are located? Couldn’t find it in cookbook or cookbook/future directories.

Thanks

payman

From: Aspect-devel [mailto:aspect-devel-bounces at geodynamics.org] On Behalf Of Glerum, A.C. (Anne)
Sent: October 11, 2016 4:14 AM
To: aspect-devel at geodynamics.org<mailto:aspect-devel at geodynamics.org>
Subject: Re: [aspect-devel] boundary velocity function expressions

Hi Mohamed,

I don't think anything has changed. The plugin file is called two_merged_boxes.cc, but to use the plugin, in the input file select "box with lithosphere boundary indicators".

Payman, there are two tests using this geometry model ("lithosphere_boundary_indicator.prm" for the 2d case), in case you'd like an example.

Cheers,
Anne


On 11 Oct 2016, at 08:32, Mohamed Gouiza <M.Gouiza at leeds.ac.uk<mailto:M.Gouiza at leeds.ac.uk>> wrote:

Hi Anne,

Is the two_merged_boxes geometry the new name for the box_with_lithosphere geometry?
If it is the case, then the manual needs to be updated

Mohamed

From: Aspect-devel [mailto:aspect-devel-bounces at geodynamics.org] On Behalf Of John Naliboff
Sent: 11 October 2016 07:14
To: aspect-devel at geodynamics.org<mailto:aspect-devel at geodynamics.org>
Subject: Re: [aspect-devel] boundary velocity function expressions

Hi Anne,

Thanks for pointing that out!

Payman - from the file two_merged_boxes.cc documentation section:
                "An example application of this geometry is to prescribe a velocity on "
                "the lithospheric plates, but use open boundary conditions underneath. "

Seems like this is exactly what you are looking for.

Cheers,
John

*************************************************
John Naliboff
Assistant Project Scientist, CIG
Earth & Planetary Sciences Dept., UC Davis





On Oct 10, 2016, at 10:37 PM, Glerum, A.C. (Anne) <A.C.Glerum at uu.nl<mailto:A.C.Glerum at uu.nl>> wrote:

Hi Payman and John,

It's possible to prescribe two different velocity boundary conditions on the vertical boundaries of a box domain when you use the geometry model "two merged boxes". For example, a prescribed inflow of the lithosphere and free slip in the mantle.

Cheers,
Anne


On 11 Oct 2016, at 06:55, John Naliboff <jbnaliboff at ucdavis.edu<mailto:jbnaliboff at ucdavis.edu>> wrote:
Hi Payman,

Glad the input file helped.

However, how can I prescribe velocity to a segment of a boundary and let the rest of that boundary be tangential?

In effect, you would like part of a vertical wall (right boundary) to be free-slip, while the other part has the vertical velocity prescribed?  Hmm, I’m not sure ASPECT is setup to do a ‘mixed’ velocity boundary.  In fact, I’m having a hard time thinking of a study that does this.

In the case you describe below, do you need to prescribed both the vertical velocity and not just the horizontal velocity?

Cheers,
John

*************************************************
John Naliboff
Assistant Project Scientist, CIG
Earth & Planetary Sciences Dept., UC Davis





On Oct 10, 2016, at 7:22 PM, Payman Janbakhsh <payman.janbakhsh at mail.utoronto.ca<mailto:payman.janbakhsh at mail.utoronto.ca>> wrote:

Thank you John,
Actually the continental extension prm file that you sent to Mohamed helped me to figure out the velocity prescription to different boundaries using functions.

However, how can I prescribe velocity to a segment of a boundary and let the rest of that boundary be tangential?
For instance, considering a right boundary, a mantle lithospheric slab having its own westward prescribed velocity, but the rest of that boundary (mantle) be tangential.

Thanks again

Payman

From: Aspect-devel [mailto:aspect-devel-bounces at geodynamics.org] On Behalf Of John Naliboff
Sent: October 10, 2016 12:25 PM
To: aspect-devel at geodynamics.org<mailto:aspect-devel at geodynamics.org>
Subject: Re: [aspect-devel] boundary velocity function expressions

Hi Payman,

Specifying the velocity on the boundaries works a bit differently than what you have outlined below.

In 2D you need to specify velocity components for x and y, which you do via the function.  You can control how the velocity on different boundaries (ex: left & right) by including conditional statements in your functions based on the position (defined by 'x' and 'y' in 2D).

You can also specify that only certain components of the function apply to a certain boundary (i.e. only x velocity from functions is applied to left/right boundary).

If there is a specific setup you are thinking of, can you sent over a basic parameter file that we can look over?

Cheers,
John






*************************************************

John Naliboff

Assistant Project Scientist, CIG

Earth & Planetary Sciences Dept., UC Davis
On 10/09/2016 03:08 PM, Payman Janbakhsh wrote:
Hi,
I’m trying to implement the following for a 2D problem:

Set Prescribed velocity boundary indicators = left : function  ,  right : function

But get error when trying to give  Function expressions in:     set Function expression =
I have tried separating 2 velocity components with semicolon and separate function expressions with comma .
Example:
                                                            Left boundary function                  right boundary function
Set Function expression =             if(z>=1000 , 1, 0) ; 0           ,           if(z>=1000, -1,0) ; 0

I’ve tried many ways including below but all give errors or nonsensical velocity Glyphs:
Set Function expression =          left:   if(z>=1000 , 1, 0) ; 0           ,     right:      if(z>=1000, -1,0) ; 0
Set Function expression =           left =   if(z>=1000 , 1, 0) ; 0           ,    right=       if(z>=1000, -1,0) ; 0
Set Function expression =           (  if(z>=1000 , 1, 0) ; 0     )      ,       (    if(z>=1000, -1,0) ; 0 )
…

How can I separate multiple function expressions each for its corresponding boundary indicator ?

Thanks

Payman








_______________________________________________

Aspect-devel mailing list

Aspect-devel at geodynamics.org<mailto:Aspect-devel at geodynamics.org>

http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel

_______________________________________________
Aspect-devel mailing list
Aspect-devel at geodynamics.org<mailto:Aspect-devel at geodynamics.org>
http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel

_______________________________________________
Aspect-devel mailing list
Aspect-devel at geodynamics.org<mailto:Aspect-devel at geodynamics.org>
http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel
_______________________________________________
Aspect-devel mailing list
Aspect-devel at geodynamics.org<mailto:Aspect-devel at geodynamics.org>
http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel

_______________________________________________
Aspect-devel mailing list
Aspect-devel at geodynamics.org<mailto:Aspect-devel at geodynamics.org>
http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel

_______________________________________________
Aspect-devel mailing list
Aspect-devel at geodynamics.org<mailto:Aspect-devel at geodynamics.org>
http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel

_______________________________________________
Aspect-devel mailing list
Aspect-devel at geodynamics.org<mailto:Aspect-devel at geodynamics.org>
http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20161011/51d4fd23/attachment-0001.html>


More information about the Aspect-devel mailing list