integral region question Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » integral region question « Previous Next »

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

Maxime Poirier (mpoirier)
New member
Username: mpoirier

Post Number: 1
Registered: 06-2008
Posted on Monday, June 16, 2008 - 03:35 pm:   

I have an interest in developing an electrostatic model for non-std multi-conductors transmission lines.

So, in learning FLexPDE's capabilities, I've looked at the "Capacitance per Unit Length" example in the Applications Manual and got confused by how the INTEGRAL function is being used in the SUMMARY:

SUMMARY
...
report integral( energyDensity, 'inside') as 'Energy (J/m)'
report 2 * integral( energyDensity, 'inside') / v0^2 as 'Capacitance (f/m)'
report 2 * integral( energyDensity) / ( v0 * sintegral( normal[ eps * grad( v)], 'conb0', 'diel0'))
as 'cap_by_energy / cap_by_charge'

When calculating the capacitance, the integral of the energy density is either specified to be for the 'inside' region or not specified.

Since the 'inside' region is the entire problem region and, as BC value is set to 0V, I assume that it should give the same result as not specifying the region...

Well, I'm obviously wrong! Can someone tell me the difference between the two ways of specifying the integral function in this example.

Thanks

Maxime


Top of pagePrevious messageNext messageBottom of page Link to this message

Marek Nelson (mgnelson)
Moderator
Username: mgnelson

Post Number: 44
Registered: 07-2007
Posted on Monday, June 16, 2008 - 06:07 pm:   

The INTEGRAL of an expression without a REGION specifier will integrate all cells in the computation mesh. The INTEGRAL of an expression with a REGION specifier will integrate only those cells explicitly marked as being in that region.

For example, say we define a REGION 'square' and then define a REGION 'circle' that is inside the square. The REGION 'square' is now a square that has a circle removed.

Then asking for an INTEGRAL(exp) will give the integral of exp over both the circle and square, INTEGRAL(exp,'square') will give the integral only of the square without the circle.

I have attached a script showing this. Note that INTEGRAL(exp) is equal to the sum of INTEGRAL(exp,'square') and INTEGRAL(exp,'circle').

application/octet-streamIntegrals Example
integrals.pde (0.4 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Maxime Poirier (mpoirier)
New member
Username: mpoirier

Post Number: 2
Registered: 06-2008
Posted on Monday, June 23, 2008 - 10:09 am:   

Thank you for your explanation. This was very useful.

I'm now looking at doing surface/line integral around a conductor to determine its charge.

Please remember that my end goal is to determine the capacitance of multiconductor lines.

To try it out, I used the capacitance.pde file from the applications_em folder and used the "Feature" function to circle the conductor. THen I did the sintegral of the contour of "D" in order to get the charge. I found that the only way that I could get the similar charge (as other technique used in this example) is by making the contour the same diameter as the dielectric surrounding the conductor.

Could you please help me understand why this is?

I have included my modified version of the capacitance.pde file.

Is there an easier/simpler way to do this?

Thanks for your help.


application/octet-streamcapacitance_mod
capacitance_MAX.pde (3.6 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1135
Registered: 06-2003
Posted on Monday, June 23, 2008 - 02:29 pm:   

The core of this issue is the question of what it means to compute the "normal" to a line that is imbedded in a material (a FEATURE). There are two normals that lie in the computation plane, facing in opposite directions.

The usual definition of "normal" in FlexPDE is the "outward normal", referenced to some region that is "inside". Since both sides of a feature are "inside" the same region, the word "outward" is undefined.

This interpretation has been subject to some modifications in various releases of FlexPDE. At present, the values on the two sides of the feature are averaged to form the integral. But this ignores the issue of the direction of the normal, so it doesn't work for integrals of normals (which average to zero because of the opposite directions).

One way out is to move the integral path onto the material boundary and specify which region to evaluate the integrand in.
This can get messy if there are many regions involved, as you must then add several integrals, but it should work in your problem.

Another way is to make your existing integration feature the boundary of a region.
The new region must be defined with due attention to the overlaying rules of FlexPDE domain definition, and given appropriate parameter definitions. Now you can integrate over the region inside or outside the integration path and get the same answer (correcting for sign).

Another way is to integrate an expression that is not ambiguous. In your case, the dot product of the gradient and the unit outward radial would do the job:
(dx(V)*(x-x0)+dy(V)*(y-y0))/(c*r0)
Top of pagePrevious messageNext messageBottom of page Link to this message

Maxime Poirier (mpoirier)
Junior Member
Username: mpoirier

Post Number: 3
Registered: 06-2008
Posted on Tuesday, June 24, 2008 - 12:11 pm:   

Thanks for the clarification.

I tried the following two things:

I implemented your last suggestion i.e. explicit expression.

I also generated a unit vector normal to the Feature (circular shape) and did the dot product with the vector D.

Both expressions give me similar results. If the "feature" (called wall) is on top of a boundary, then the sintegral gives the expected charge Q, else it gives half the value.

Could this be related to your explanation of how the integral function works: "At present, the values on the two sides of the feature are averaged to form the integral. But this ignores the issue of the direction of the normal, so it doesn't work for integrals of normals "

Division/2? Why not on the boundary?

thanks,

Maxime

P.S> I'm using v5.0.15 pro.
application/octet-streamcapacitance_mod2
capacitance_MAX2.pde (3.7 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Maxime Poirier (mpoirier)
Member
Username: mpoirier

Post Number: 4
Registered: 06-2008
Posted on Tuesday, June 24, 2008 - 12:24 pm:   

I attached the worng file.

Here's the good one.

Sorry!

Maxime
application/octet-streamcapacitance_mod2 new
capacitance_MAX2.pde (4.0 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1137
Registered: 06-2003
Posted on Tuesday, June 24, 2008 - 01:49 pm:   

There was an error in version 5.0.15 that divided integrals on features by 2. This was corrected in 5.0.16 (4/29/07).
You should download the latest update (5.0.22).
Top of pagePrevious messageNext messageBottom of page Link to this message

Steve Macica (steve_macica)
New member
Username: steve_macica

Post Number: 1
Registered: 05-2009
Posted on Sunday, May 31, 2009 - 01:21 pm:   

Hello Mr. Nelson,
Like Maxime, I to am involved with non standard multi-conductor configurations and have spent quiet a bit of time trying to figure out why, when using a "feature" to calculate the charge (and therefore the capacitance) within an area, the result was incorrect. I'm wish I stumbled onto this thread earlier, it would have saved me some time. My question is: Why, when using the elevation function, it the integration result correct? Please look at my additions to the enclosed file.
application/octet-streamSteve's modification to Maxime's file (elevation func added)
Fromfourums1.pde (4.2 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1259
Registered: 06-2003
Posted on Sunday, May 31, 2009 - 10:45 pm:   

It looks to me like the SUMMARY integrals are the same as the ELEVATION integral except for a sign. Is that what you mean by "incorrect"?

A request for a NORMAL component on a FEATURE is ambiguous, because there are two vectors normal to the feature, pointing in opposite directions. There is no syntax in FlexPDE that allows you to specify which one you want, so the sign of the result is unpredictable.

On a REGION boundary, you can specify one of the adjacent regions as the evaluation region, and the NORMAL will be "outward" with respect to that region.
Top of pagePrevious messageNext messageBottom of page Link to this message

Steve Macica (steve_macica)
New member
Username: steve_macica

Post Number: 2
Registered: 05-2009
Posted on Monday, June 01, 2009 - 08:39 am:   

Sorry about my grammar in my first post...it made it difficult for you to understand my question.

Maxime and I had the same problem in that the surface integral(below) would not correctly calculate the correct result when using the feature "wall".



! added a report ***********************************
report sintegral( normal( eps * grad( v)), 'wall')/V0 as 'Capacitance (F/m) test feature'
!***************************************************

You gave the explanation on previous posts, suggested a fix, and I understand it.

I'm not questioning the sign given by the various outputs in the Summary vs the elevation plot. I'm more curious as to why the value in the elevation is correct vs the incorrect result from the surface integral(above).

I added:
!Steve added elevation **************************************
elevation(normal( eps * grad( v))) on 'wall' as 'Integration result of elevation of wall'

Please note that it uses the feature "wall".
My question is, why, when using the elevation function(above), is the integration result displayed on the elevation plot at the bottom correct(i.e. 2.958256E-11)?

It seams to me that I'm making a request for a normal component on a feature in the elevation statement above and the result is correct. I've done the same on coaxial and plate capacitance examples and I get the correct result.

Best Regards,
Steve
Top of pagePrevious messageNext messageBottom of page Link to this message

Steve Macica (steve_macica)
Junior Member
Username: steve_macica

Post Number: 3
Registered: 05-2009
Posted on Monday, June 01, 2009 - 08:42 am:   

application/octet-streamEnclosed file has the surface integral that computes the incorrect value added to the Summary.
Fromfourums2.pde (4.4 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1263
Registered: 06-2003
Posted on Tuesday, June 02, 2009 - 02:48 pm:   

FlexPDE forms surface integrals by evaluating the integrands in all mesh cells that adjoin the boundary and lie in the specified (or default) material region.

When integrating on an imbedded feature, this means the integrand will be evaluated in cells on both sides of the boundary.

"Normal" is interpreted as the outward normal with respect to the evaluation cell.

Since "normal" is opposite in direction in two cells that share the boundary, the value of the normal will be approximately equal and opposite in sign in the two cells.

The evaluation of a "normal" is therefore nominally zero, the final result representing approximation errors only.

This problem does not arise on region boundaries, as the evaluation is made in only one region. On Features, both sides lie in the same region.

You can form an expression that returns the correct value either by performing the integral on a Region boundary or by taking the absolute value of the integrand on a Feature. See attached.

application/octet-stream
Fromfourums2.pde (4.5 k)

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