Associative Geometry
- From: "Noa Rappaport" <noa.rappaport@xxxxxxxxxxxxxx>
- Date: Thu, 1 Dec 2005 09:42:29 -0500
I have a geometry of 4 little circles inside a bigger circle. Now I
want to loop over movement of one of the little circles, and the
boundary numbers will change...
I tried to use geomanalyze, but I couldn't get it to work...
Can anyone help ?
Thanks,
Noa
Here is the code:
% Geometry
g1=circ2(num2str(ascus_radius)
,'base','center','pos',{num2str(Ascus_loc_x),num2str(Ascus_loc_y)},'ro
t','0'); %Ascus
g2=circ2(num2str(cell_radius),'base','center','pos',{num2str(R1_loc_x)
,num2str(R1_loc_y)},'rot','0'); %R1
g3=circ2(num2str(cell_radius),'base','center','pos',{num2str(S2_loc_x)
,num2str(S2_loc_y)},'rot','0');%S2
g4=circ2(num2str(cell_radius),'base','center','pos',{num2str(S1_loc_x)
,num2str(S1_loc_y)},'rot','0'); % S1
g5=circ2(num2str(cell_radius),'base','center','pos',{num2str(R2_loc_x)
,num2str(R2_loc_y)},'rot','0'); % R2
g6=geomcomp({g1,g2,g3,g4,g5},'ns',{'C1','C2','C3','C4','C5'},'sf','C1-
C2-C3-C4-C5','edge','none');
clear s
s.objs={g6};
s.name={'CO1'};
s.tags={'g6'};
fem.draw=struct('s',s);
fem.geom=geomanalyze(fem, fem.draw);
% Constants
fem.const = {'v0',v0,'d0',d0,'d1',d1, 'R', cell_radius, 'pi', pi };
% Initialize mesh
fem.mesh=meshinit(fem);
% Application mode 1
clear appl
appl.mode.class = 'FlDiffusion';
appl.assignsuffix = '_di';
clear bnd
switch receiving
case 1 % SS assumption
bnd.N = {[num2str(-permeability_factor) '*c'],
[num2str(secretion_rate) '/(2*pi*R)*(4*pi*R^2)'],
'-d1*Complex*4*pi*R^2'};
bnd.type = 'N'; % N is already the diffusive flux (D*grad)
case 2 % Reflective
bnd.N = {[num2str(-permeability_factor) '*c'],
[num2str(secretion_rate) '/(2*pi*R)*(4*pi*R^2)'], 0};
bnd.type = 'N';
case 3 %Perfect sink
bnd.N = {[num2str(-permeability_factor) '*c'],
[num2str(secretion_rate) '/(2*pi*R)*(4*pi*R^2)'],
'-d1*Complex*4*pi*R^2'};
bnd.c0 = {0,0,0};
bnd.type = {'N','N','C'};
end
bnd.ind = [1,1,3,3,2,2,3,3,2,2,1,1,2,2,3,3,2,2,3,3];
appl.bnd = bnd;
clear equ
equ.D = D;
if with_protease_flag
equ.R = [ '-' num2str(deg_rate) '*c'];
end
equ.ind = [1];
appl.equ = equ;
fem.appl{1} = appl;
fem.outform = 'general';
% Boundary expressions
clear bnd
bnd.ind = [1,1,2,2,1,1,2,2,1,1,1,1,1,1,2,2,1,1,2,2];
bnd.expr = {'Complex',{'','v0/d0*c/(1+d1/d0*c)'}};
fem.bnd = bnd;
% Multiphysics
fem=multiphysics(fem);
% Extend mesh
fem.xmesh=meshextend(fem);
% Extend mesh
fem.xmesh=meshextend(fem);
% Solve problem
fem.sol=femtime(fem,'solcomp',{'c'},'outcomp',{'c'}, ...
'tlist', time_points,'tout','tlist');
% Save current fem structure for restart purposes
fem0=fem;
.
- Prev by Date: Re: wavread, performance due to memory allocation
- Next by Date: Associative Geometry in Femlab
- Previous by thread: Viewshed & Line of Sight singularities?
- Next by thread: Associative Geometry in Femlab
- Index(es):
Relevant Pages
|