A sphere inside the cube Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » A sphere inside the cube « Previous Next »

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

Adrian Rozanski (mendoza81)
Member
Username: mendoza81

Post Number: 4
Registered: 04-2006
Posted on Sunday, April 23, 2006 - 10:32 am:   

Hi. I`m solving the problem of computation of the effective elasticity parameters with assumption of periodic boundary conditions. In 2D everything is quite simple. In 3D I had a problem to set the periodic BCs. But I have already managed the problem. But now I would like to put the empty (void) sphere in the middle of the cube. I have no idea how to add the empty sphere to my input file. I have tried to make it many times, but no success. Have you got any ideas?

Here is my input file:

TITLE 'effective elasticity parameters - periodic boundary cond.'
COORDINATES
cartesian3
VARIABLES
u
v
w
SELECT
painted
errlim=1e-1
DEFINITIONS
{R=0.05}
A=30
G=30
Ex=1
Ey=0
Ez=0
Exy=0
Exz=0
Eyz=0
Sx=A*(Ex+Ey+Ez)+2*G*Ex+A*(dx(u)+dy(v)+dz(w))+2*G*dx(u)
Sy=A*(Ex+Ey+Ez)+2*G*Ey+A*(dx(u)+dy(v)+dz(w))+2*G*dy(v)
Sz=A*(Ex+Ey+Ez)+2*G*Ez+A*(dx(u)+dy(v)+dz(w))+2*G*dz(w)
Txy=2*G*(Exy+0.5*(dx(v)+dy(u)))
Txz=2*G*(Exz+0.5*(dx(w)+dz(u)))
Tyz=2*G*(Eyz+0.5*(dy(w)+dz(v)))
! INITIAL VALUES
EQUATIONS
u: dx(Sx)+dy(Txy)+dz(Txz)=0
v: dx(Txy)+dy(Sy)+dz(Tyz)=0
w:dx(Txz)+dy(Tyz)+dz(Sz)=0
Periodic EXTRUSION
SURFACE 'Bottom' z=-0.2
LAYER 'Underneath'
SURFACE 'Can bottom' z=-0.19
LAYER 'Can'
SURFACE 'Can Top' z=0.19
LAYER 'Above'
SURFACE 'Top' z=0.2
CONSTRAINTS { Integral constraints }
integral(u) = 0
integral(v) = 0
integral(w) = 0
BOUNDARIES
LIMITED REGION 1 'box'
LAYER 'UNDERNEATH'
LAYER 'Above'
START(-0.21,-0.21)
NATURAL(u)=0
NATURAL(v)=0
NATURAL(w)=0
LINE TO (0.21,-0.21)
NATURAL(u)=0
NATURAL(v)=0
NATURAL(w)=0
LINE TO (0.21,0.21)
NATURAL(u)=0
NATURAL(v)=0
NATURAL(w)=0
LINE TO (-0.21, 0.21)
NATURAL(u)=0
NATURAL(v)=0
NATURAL(w)=0
LINE TO CLOSE

limited REGION 2 'mini box'
layer 'can'
START(-0.2,-0.2)
NATURAL(u)=0
NATURAL(v)=0
NATURAL(w)=0
LINE TO (-0.19, -0.2)
PERIODIC (x,y+0.4)
LINE TO (0.19, -0.2)
NATURAL(u)=0
NATURAL(v)=0
NATURAL(w)=0
LINE TO (0.2,-0.2)
Periodic (x-0.4,y)
LINE TO (0.2,0.2)
NATURAL(u)=0
NATURAL(v)=0
NATURAL(w)=0
LINE TO (0.19, 0.2)
LINE TO (-0.19, 0.2)
NATURAL(u)=0
NATURAL(v)=0
NATURAL(w)=0
LINE TO (-0.2, 0.2)
LINE TO CLOSE

{LIMITED REGION 2 'empty sphere'
LAYER 'can' void
START (R,0)
natural(u)=0
natural(v)=0
natural(w)=0
ARC(CENTER=0,0) ANGLE=360 TO CLOSE}

PLOTS
Grid(x,y,z)
Grid(y,z) on x=0
CONTOUR(Sx) on y=0
CONTOUR(Sy) on y=0
CONTOUR(Sz) on y=0
CONTOUR(Txy) on y=0
CONTOUR(Txz) on y=0
CONTOUR(Tyz) on y=0
SUMMARY
REPORT(Vol_Integral(Sx)/0.4^3)
REPORT(Vol_Integral(Sy)/0.4^3)
REPORT(Vol_Integral(Sz)/0.4^3)
REPORT(Vol_Integral(Txy)/0.4^3)
REPORT(Vol_Integral(Tyz)/0.4^3)
REPORT(Vol_Integral(Txz)/0.4^3)
END
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 584
Registered: 06-2003
Posted on Tuesday, April 25, 2006 - 04:27 pm:   

The example problem "Samples | Misc | 3D_Domains | 3D_SphereBox.pde" constructs a void sphere inside a box.

"2D_SphereBox.pde" shows a 2D analog of this problem using cylindrical geometry.

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