Google Groups Home
Help | Sign in
add2W and bcg auxcode
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Gary Sharpe  
View profile
 More options May 16, 8:37 am
From: Gary Sharpe <men...@leeds.ac.uk>
Date: Fri, 16 May 2008 05:37:43 -0700 (PDT)
Local: Fri, May 16 2008 8:37 am
Subject: add2W and bcg auxcode
For EulerEquations or ReactiveEulerEquations
can one  have more than one add2W statement,
i.e. is it possible to add more than one new variable to
the solution vector?
The example i have in mind is this,
currently I have something along the lines
ReactiveEulerEquations {
   space=2D
   add2W=PVORT
}

and I have a procedure which after n timesteps plots the PVORT field
e.g. with statements like
minmax W::PVORT[] -> minmax.
Now I want an additonal field, NVORT say so I tried
ReactiveEulerEquations {
   space=2D
   add2W=PVORT
   add2W=NVORT
}

without any other changes to the code
and get:
expression 'W::PVORT[]' is undefined!

Line 13 is:
minmax W::PVORT[] -> min, max

error near:
W::PVORT[] -> min, max
I am assuming the problem may be it only
accepts the last add2W statement?

On a similar vein, can one have more than one
auxcode in BCG.
e.g. I currently have
BasicCodeGenerator {
    scheme = roe'$znd::model
    solver    = 1step
    auxcode = code/pvort_trace

}

where the code pvort_trace is the routine which
updates the W::PVORT variable field.
If I wanted to evaluate a 2nd variable field
(NVORT say) is it acceptable to daisy chain
a second piece of code
BasicCodeGenerator {
    scheme = roe'$znd::model
    solver    = 1step
    auxcode = code/pvort_trace
    auxcode = code/nvort_trace
}

say, or does one of the auxcode statements
just overwrite the other?

Any advice from anyone who has looked at
this sort of thing before would be appreciated...

Best Wishes
Gary


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile
 More options May 16, 10:47 am
From: James Quirk <j...@galcit.caltech.edu>
Date: Fri, 16 May 2008 07:47:31 -0700 (PDT)
Local: Fri, May 16 2008 10:47 am
Subject: Re: add2W and bcg auxcode

The above won't work as add2W is a procedure parameter
and so the second entry simply overwrites the first.
What you need to do is write:

ReactiveEulerEquations {
   space = 2D
   add2W = PVORT,NVORT

}

And if you take a look at:

    $AMRITA/stdlib/equations/Add2W.amr

you'll see that it loops over the supplied parameter
adding named entries to the solution vector.

Again you could answer this question by delving into
the bowls of BCG. As before, the second auxcode
will overwrite the first. And if you take a look at:

$AMRITA/plugin/amr_sol/BCG/equations/ReactiveEulerEquations/AddAuxiliaryCod e.amr

you'll see that it loops over supplied filenames and
so you could write:

BasicCodeGenerator {
   scheme = roe'1a
   solver    = 1step
   auxcode = code/pvort_trace,code/nvort_trace

}

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gary Sharpe  
View profile
 More options May 16, 12:24 pm
From: Gary Sharpe <men...@leeds.ac.uk>
Date: Fri, 16 May 2008 09:24:39 -0700 (PDT)
Local: Fri, May 16 2008 12:24 pm
Subject: Re: add2W and bcg auxcode
James,
ah, Isee...I assumed it was overwriting somehow. The correct way
to do it is, in hindsight, obvious.
>     $AMRITA/stdlib/equations/Add2W.amr
>     $AMRITA/plugin/amr_sol/BCG/equations/ReactiveEulerEquations/AddAuxiliaryCod e.amr

Thank, thats useful to know where these are (again obvious from
directory structure).
 Gary

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google