Calculation of a sum on a boundary Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Calculation of a sum on a boundary « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Frederick R. Phelan Jr. (contemplation)
New member
Username: contemplation

Post Number: 1
Registered: 03-2004
Posted on Wednesday, March 03, 2004 - 04:20 pm:   

Hi,

We are doing a flow problem with two diffusing species. At the outlet, we want to calculate the measure D = SUM[i=1,N](c_i - c_avg)^2/N, where the sum is computed for every node across the boundary (a kind of a variance). Here, c_avg is a defined scalar value, and the boundary is just a straight 1-D line.

Is there anyway to do this internally in the flexpde script without exporting the boundary values to a text file and manipulating the data myself. The problem is time dependent.

Thanks.



Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 116
Registered: 06-2003
Posted on Thursday, March 04, 2004 - 12:06 am:   

Do you mean the c_i to indicate a value of C at node i? Or are these separate components, comprising N different variables?

FlexPDE does not allow you direct access to the stored mesh, because it wants to be free to refine or merge it, compress and restructure it at will.

You can, however, form integrals, since the focus of FlexPDE is on the mathematical character of your problem, and not the implementation details.

If you name a boundary segment or feature, you can integrate anything you want on that segment. See "integral" in the Help Index.
Top of pagePrevious messageNext messageBottom of page Link to this message

Frederick R. Phelan Jr. (contemplation)
New member
Username: contemplation

Post Number: 2
Registered: 03-2004
Posted on Thursday, March 04, 2004 - 11:20 am:   

Sorry this was not clear ... yes, by c_i I meant the value of c at boundary node i. I guess I thought that there was a way to form an array of the boundary values, and then use it in the sum.

How do I do a boundary integral over only a small portion of the boundary? The outlet is just two point that is part of an overall region.

Thanks.

Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 118
Registered: 06-2003
Posted on Thursday, March 04, 2004 - 05:13 pm:   

You can overlay a FEATURE on an existing boundary (or part of an existing boundary) and give it a name. Then you can integrate on it. It is wise, though not mandatory, to include the endpoints of the Feature in the trace of the original boundary.

Backstrom does this kind of overlay, for example, in "Backstrom_Books | Fields_of_Physics | b_Electricity | Elax4.pde".
Top of pagePrevious messageNext messageBottom of page Link to this message

Frederick R. Phelan Jr. (contemplation)
Junior Member
Username: contemplation

Post Number: 3
Registered: 03-2004
Posted on Friday, March 05, 2004 - 12:04 pm:   

I am not following this reference ... is this part of the samples provided with version 4? I have version 3. There does not appear to be any feature examples in 3 but I'll give it a shot.

Thanks.
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 120
Registered: 06-2003
Posted on Friday, March 05, 2004 - 02:30 pm:   

The referenced problem is in the "Backstrom_Books" folder in the FlexPDE installation directory. This folder has been part of the FlexPDE distribution since version 1.0.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration