contour fieldmap - Mem protection fault

General discussions about how to formulate a script for FlexPDE.

contour fieldmap - Mem protection fault

Postby zygi151 on Wed Apr 28, 2021 12:52 am

I try to change script below. I come across, a problem "Mem protection fault".
Script is not my. I try change x to y, and y to x, and i do not change others thing.
At line market '1' contour fieldmap(u) work corectly, but if i change to '2' they not.
Can you tell me in this case what is not corectly ?

Code: Select all
title 'Plate capacitor'

variables
u
definitions
Lx=1      Ly=1
delx=0.5     d=0.2
ddy=0.2*d
Ex=-dx(u)     Ey=-dy(u)
eps0=8.854e-12
eps



equations
u : div(-eps*grad(u)) = 0


boundaries
! 1 and 2 -
Region 1
   eps=eps0
  start "V0" (-Lx,-Ly)  Load(u)=0
  line to (Lx,-Ly) to (Lx,Ly) to (-LX,Ly) to close

!2
start "V1" (-d/2, -delx/2) value(u)=0
line to (-d/2, delx/2) to (-d/2-ddy, delx/2) to (-d/2-ddy, -delx/2) line to close

{
!1
  start "V1" (-delx/2,-d/2)  value(u)=0 
  line to (delx/2,-d/2) to (delx/2,-d/2-ddy) to (-delx/2,-d/2-ddy)   to close
}

!2
start "V2"
( d/2+ddy, -delx/2) value(u)=1
line to (d/2+ddy, delx/2) to (d/2 , delx/2) to (d/2 , -delx/2) to close

{
!1
  start(-delx/2,d/2+ddy)       value(u)=1
  line to (delx/2,d/2+ddy) to (delx/2,d/2) to(-delx/2,d/2)  to close
}

!2
region 2
eps = 7.0*eps0
start(-d/2, -delx/2) line to (-d/2, delx/2) to (d/2 , delx/2) to (d/2, -delx/2) to close

{
!1
Region 2
   eps = 7.0*eps0   start(-delx/2,-d/2)
  line to (delx/2,-d/2) to (delx/2,d/2) to(-delx/2,d/2)         to close
}

monitors
  contour(u)


plots
  contour(u)
  surface(u)
  vector(dx(u),dy(u)) norm
   vector(dx(u),dy(u))

   ! Work only when 2 is On. On 1 not.
   !fieldmap(u) on "V1" fieldlines=40 as "Field Map"
   !contour fieldmap(u) on "V2" fieldlines=40 points=400 as "Potential and Field Map"

end
zygi151
 
Posts: 9
Joined: Mon Aug 27, 2018 6:01 am

Re: contour fieldmap - Mem protection fault

Postby moderator on Wed Apr 28, 2021 5:10 pm

The things you have done look completely valid, so there may be an error in FlexPDE. We will have to dig into it and discover what is happening.
For now, just stick with the XY in the original order?
moderator
 
Posts: 879
Joined: Tue Jan 11, 2011 1:45 pm

Re: contour fieldmap - Mem protection fault

Postby moderator on Thu Apr 29, 2021 5:39 pm

We have found an error in the generation of field map contour generation. We have fixed this in v719x6 and posted a pre-release at http://www.pdesolutions.com/download/xf ... 6win64.exe. This is a self extracting archive of just the executables, not a full install. Extract the files and copy them over your current installation. If you need a Linux or Mac version, please let us know.

This fix will be present in the formal release of v719 which we will plan on publishing early next week. Thank you for bringing this to our attention.
moderator
 
Posts: 879
Joined: Tue Jan 11, 2011 1:45 pm

Re: contour fieldmap - Mem protection fault

Postby zygi151 on Fri May 07, 2021 1:42 pm

You`re quick...wow...
I see other protect fault is under.
Please check that, it is too when you rotation x to y

Code: Select all
title 'Plate capacitor'

variables
u
definitions
Lx=1      Ly=1
delx=0.5     d=0.2
ddy=0.2*d
Ex=-dx(u)     Ey=-dy(u)
eps0=8.854e-12
eps



equations
u : div(-eps*grad(u)) = 0


boundaries
! 1 and 2 -
Region 1
   eps=eps0
  start "V0" (-Lx,-Ly) ! Load(u)=1
  line to (Lx,-Ly) to (Lx,Ly) to (-LX,Ly) to close

  start "V1" (-delx/2,-d/2) 
  value(u)=1 ! here
  line to (delx/2,-d/2) to (delx/2,-d/2-ddy) to (-delx/2,-d/2-ddy)   to close


  start(-delx/2,d/2+ddy)       
  value(u)=1 ! here
  line to (delx/2,d/2+ddy) to (delx/2,d/2) to(-delx/2,d/2)  to close


Region 2
   eps = 7.0*eps0   start(-delx/2,-d/2)
  line to (delx/2,-d/2) to (delx/2,d/2) to(-delx/2,d/2)         to close


monitors
  contour(u)


plots
  contour(u)
  surface(u)
  vector(dx(u),dy(u)) norm
   vector(dx(u),dy(u))

   ! Work only when 2 is On. On 1 not.
   fieldmap(u) on "V1" fieldlines=40 as "Field Map"
   contour fieldmap(u) on "V1" fieldlines=40 points=400 as "Potential and Field Map"
fieldmap(u) on "V0" fieldlines=40 as "Field Map"
   contour fieldmap(u) on "V0" fieldlines=40 points=400 as "Potential and Field Map"
   
end


I expect non field...
zygi151
 
Posts: 9
Joined: Mon Aug 27, 2018 6:01 am

Re: contour fieldmap - Mem protection fault

Postby moderator on Mon May 10, 2021 3:26 pm

This appears to be because there is no field. Your voltages are the same on the two plates.

Clearly FlexPDE shouldn't get a memory protection fault when there is no field. We will look at it and repair it in v7.20. Thanks for bringing this to our attention.
moderator
 
Posts: 879
Joined: Tue Jan 11, 2011 1:45 pm


Return to FlexPDE Discussion

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron