<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>FEA Forums &#187; Forum: COMSOL Forums - Recent Posts</title>
<link>http://www.FEA-Forums.com/</link>
<description>FEA Forums &#187; Forum: COMSOL Forums - Recent Posts</description>
<language>en</language>
<pubDate>Tue, 07 Feb 2012 22:56:28 +0000</pubDate>

<item>
<title>lm_0202004 on "help with the coomand asseminit"</title>
<link>http://www.FEA-Forums.com/topic/298#post-395</link>
<pubDate>Wed, 30 Mar 2011 19:04:09 +0000</pubDate>
<dc:creator>lm_0202004</dc:creator>
<guid isPermaLink="false">395@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;I have the same problem. why?
&#60;/p&#62;</description>
</item>
<item>
<title>michele on "help with the coomand asseminit"</title>
<link>http://www.FEA-Forums.com/topic/298#post-391</link>
<pubDate>Sun, 20 Mar 2011 13:52:50 +0000</pubDate>
<dc:creator>michele</dc:creator>
<guid isPermaLink="false">391@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;hi everybody..I'm triying to use a file initially written on FEMLAB,on COmsol 3.5a.&#60;br /&#62;
Comsol show me error in the line 57-58..and I can't understand why..(i took this code from an article that has been sent to me from a professor).&#60;br /&#62;
I have to figure out this trouble cause I need this code for my thesis..&#60;br /&#62;
I attach the code. Thank anyone will help me&#60;/p&#62;
&#60;p&#62;% FEMLAB CODE FOR THE 4-TERMINAL DEVICE EXAMPLE OF SECTION 4.2&#60;br /&#62;
clear fem femadj&#60;br /&#62;
% DEFINE REYNOLDS NUMBER, DARCY NUMBER, LENGTH OF DESIGN DOMAIN, AND VOLUME FRACTION&#60;br /&#62;
Re = 50;&#60;br /&#62;
Da = 1e-4;&#60;br /&#62;
L0 = 3.0;&#60;br /&#62;
beta = 0.4;&#60;br /&#62;
% DEFINE GEOMETRY, MESH, AND SUBDOMAIN/BOUNDARY GROUPS [SEE FIGURE 6]&#60;br /&#62;
fem.geom = rect2(0,L0,0,5) + rect2(-2,0,1,2) + rect2(-2,0,3,4) + rect2(L0,L0+2,1,2) ...&#60;br /&#62;
+ rect2(L0,L0+2,3,4);&#60;br /&#62;
fem.mesh = meshinit(fem,'Hmaxsub',[3 0.125]);&#60;br /&#62;
% subdomain groups 1:design domain 2:inlet/outlet leads&#60;br /&#62;
fem.equ.ind = {[3] [1 2 4 5]};&#60;br /&#62;
% boundary groups 1:walls 2:inlets 3:outlets 4:interior&#60;br /&#62;
fem.bnd.ind = {[2:3 5:8 10 12:14 16:18 20:22] [4 23] [1 24] [9 11 15 19]};&#60;br /&#62;
% DEFINE SPACE CO-ORDINATES, DEPENDENT VARIABLES, AND SHAPE FUNCTIONS&#60;br /&#62;
fem.sdim = {'x' 'y'};&#60;br /&#62;
fem.dim = {'u' 'v' 'p' 'gamma'};&#60;br /&#62;
fem.shape = [2 2 1 1];&#60;br /&#62;
% DEFINE CONSTANTS&#60;br /&#62;
fem.const.rho = 1;&#60;br /&#62;
fem.const.eta = 1;&#60;br /&#62;
fem.const.umax = Re;&#60;br /&#62;
fem.const.alphamin = 0;&#60;br /&#62;
fem.const.alphamax = 1/Da;&#60;br /&#62;
fem.const.q = 0.1;&#60;br /&#62;
Phi0 = 96*(fem.const.eta)*(L0+4)*(fem.const.umax).^2/9;&#60;br /&#62;
% DEFINE EXPRESSIONS ON SUBDOMAIN AND BOUNDARY GROUPS&#60;br /&#62;
fem.equ.expr = {'A' 'eta*(2*ux*ux+2*vy*vy+(uy+vx)*(uy+vx))+alpha*(u*u+v*v)' ...&#60;br /&#62;
'alpha' {'alphamin+(alphamax-alphamin)*q*(1-gamma)/(q+gamma)' '0'}};&#60;br /&#62;
fem.bnd.expr = {'B' '0'};&#60;br /&#62;
% DEFINE GOVERNING EQUATIONS AND INITIAL CONDITIONS [SEE EQUATIONS (8) AND (9)]&#60;br /&#62;
fem.form = 'general';&#60;br /&#62;
fem.equ.shape = {[1:4] [1:3]}; % only define gamma on subdomain group 1&#60;br /&#62;
fem.equ.ga = {{{'-p+2*eta*ux' 'eta*(uy+vx)'} {'eta*(uy+vx)' '-p+2*eta*vy'} {0 0} {0 0}}};&#60;br /&#62;
fem.equ.f = {{'rho*(u*ux+v*uy)+alpha*u' 'rho*(u*vx+v*vy)+alpha*v' 'ux+vy' 1}};&#60;br /&#62;
fem.equ.init = {{0 0 0 beta}};&#60;br /&#62;
% DEFINE BOUNDARY CONDITIONS&#60;br /&#62;
fem.bnd.shape = {[1:3]}; % do not define gamma on any boundaries&#60;br /&#62;
fem.bnd.r = {{'u' 'v' 0 0} ... % walls: no-slip&#60;br /&#62;
{'u*nx+4*umax*s*(1-s)' 'v' 0 0} ... % inlets: parabolic profile&#60;br /&#62;
{0 'v' 0 0} ... % outlets: normal flow&#60;br /&#62;
{0 0 0 0}}; % interior: nothing&#60;br /&#62;
fem.bnd.g = {{0 0 0 0}}; % zero prescribed external forces everywhere&#60;br /&#62;
% PERFORM LINEARIZATION, DEGREE-OF-FREEDOM ASSIGNMENT, AND ASSEMBLE INITIAL CONDITION&#60;br /&#62;
fem = femdiff(fem);&#60;br /&#62;
fem.xmesh = meshextend(fem);&#60;br /&#62;
fem.sol = asseminit(fem);&#60;br /&#62;
% DEFINE STRUCTURE FOR COMPUTING RIGHT-HAND-SIDE IN ADJOINT PROBLEM [SEE EQUATION (29)]&#60;br /&#62;
femadj = fem;&#60;br /&#62;
femadj.equ.ga = {{{'diff(A,ux)' 'diff(A,uy)'} {'diff(A,vx)' 'diff(A,vy)'} ...&#60;br /&#62;
{'diff(A,px)' 'diff(A,py)'} {'diff(A,gammax)' 'diff(A,gammay)'}}};&#60;br /&#62;
femadj.equ.f = {{'diff(A,u)' 'diff(A,v)' 'diff(A,p)' 'diff(A,gamma)'}};&#60;br /&#62;
femadj.bnd.g = {{'diff(B,u)' 'diff(B,v)' 'diff(B,p)' 'diff(B,gamma)'}};&#60;br /&#62;
femadj.xmesh = meshextend(femadj);&#60;br /&#62;
% GET INDICES OF DESIGN VARIABLE IN THE GLOBAL SOLUTION VECTOR (fem.sol.u)&#60;br /&#62;
i4 = find(asseminit(fem,'Init',{'gamma' 1},'Out','U'));&#60;br /&#62;
% COMPUTE VOLUME BELOW DESIGN VARIABLE BASIS FUNCTIONS&#60;br /&#62;
L = assemble(fem,'Out',{'L'});&#60;br /&#62;
Vgamma = L(i4);&#60;br /&#62;
Vdomain = sum(Vgamma);&#60;br /&#62;
% GET INDICES OF VELOCITY-PRESSURE VARIABLES&#60;br /&#62;
i123 = find(asseminit(fem,'Init',{'u' 1 'v' 1 'p' 1},'Out','U'));&#60;br /&#62;
% DEFINE VARIABLES AND PARAMETERS FOR MMA OPTIMIZATION ALGORITHM [SEE REFERENCES [11,12,13]]&#60;br /&#62;
a0 = 1;&#60;br /&#62;
a = 0;&#60;br /&#62;
c = 20;&#60;br /&#62;
d = 0;&#60;br /&#62;
xmin = 0;&#60;br /&#62;
xmax = 1;&#60;br /&#62;
xold = fem.sol.u(i4);&#60;br /&#62;
xolder = xold;&#60;br /&#62;
low = 0;&#60;br /&#62;
upp = 1;&#60;br /&#62;
% DESIGN LOOP FOR THE ACTUAL TOPOLOGY OPTIMIZATION&#60;br /&#62;
for iter = 1:100&#60;br /&#62;
% SOLVE NAVIER-STOKES FLOW PROBLEM TO UPDATE VELOCITY AND PRESSURE&#60;br /&#62;
fem.sol = femnlin(fem,'Solcomp',{'u' 'v' 'p'},'U',fem.sol.u);&#60;br /&#62;
% SOLVE ADJOINT PROBLEM FOR LAGRANGE MULTIPLIERS&#60;br /&#62;
[K N] = assemble(fem,'Out',{'K' 'N'},'U',fem.sol.u);&#60;br /&#62;
[L M] = assemble(femadj,'Out',{'L' 'M'},'U',fem.sol.u);&#60;br /&#62;
femadj.sol = femlin('In',{'K' K(i123,i123)' 'L' L(i123) 'M' zeros(size(M)) 'N' N(:,i123)});&#60;br /&#62;
% SENSITIVITY ANALYSIS&#60;br /&#62;
gamma = fem.sol.u(i4);&#60;br /&#62;
Phi = postint(fem,'A','Edim',2) + postint(fem,'B','Edim',1);&#60;br /&#62;
dPhidgamma = L(i4) - K(i123,i4)'*femadj.sol.u;&#60;br /&#62;
% PERFORM MMA STEP TO UPDATE DESIGN FIELD&#60;br /&#62;
x = gamma;&#60;br /&#62;
f = Phi/Phi0; g = gamma'*Vgamma/Vdomain - beta;&#60;br /&#62;
dfdx = dPhidgamma/Phi0; dgdx = Vgamma'/Vdomain;&#60;br /&#62;
d2fdx2 = zeros(size(gamma)); d2gdx2 = zeros(size(gamma'));&#60;br /&#62;
[xnew,y,z,lambda,ksi,eta,mu,zeta,s,low,upp] = mmasub(1,length(gamma),iter, ...&#60;br /&#62;
x,xmin,xmax,xold,xolder,f,dfdx,d2fdx2,g,dgdx,d2gdx2,low,upp,a0,a,c,d);&#60;br /&#62;
xolder = xold; xold = x; gamma = xnew;&#60;br /&#62;
% TEST CONVERGENCE&#60;br /&#62;
if iter &#38;gt;= 100 &#124; max(abs(gamma-xold)) &#38;lt; 0.01&#60;br /&#62;
break&#60;br /&#62;
end&#60;br /&#62;
% UPDATE DESIGN VARIABLE&#60;br /&#62;
u0 = fem.sol.u; u0(i4) = gamma;&#60;br /&#62;
fem.sol = femsol(u0);&#60;br /&#62;
% DISPLAY RESULTS FOR EACH ITERATION STEP&#60;br /&#62;
disp(sprintf('Iter.:%3d Obj.: %8.4f Vol.: %6.3f Change: %6.3f', ...&#60;br /&#62;
iter,f,xold'*Vgamma,max(abs(xnew-xold))))&#60;br /&#62;
postplot(fem,'arrowdata',{'u' 'v'},'tridata','gamma','trimap','gray')&#60;br /&#62;
axis equal; shg; pause(0.1)&#60;br /&#62;
end
&#60;/p&#62;</description>
</item>
<item>
<title>qrie on "turbulence modelling--pls help"</title>
<link>http://www.FEA-Forums.com/topic/186#post-241</link>
<pubDate>Wed, 23 Jun 2010 23:54:26 +0000</pubDate>
<dc:creator>qrie</dc:creator>
<guid isPermaLink="false">241@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;hi i'm simulating the flow over an airfoil with k-epsilon turbulence model in comsol. &#60;/p&#62;
&#60;p&#62;my prof says i have to start from low velocity input, then solve n find the pressure grad over the surface, determine velocity from that and find the range over which reynolds number varies. he says i should gradually increase velocity and iterate this way. does this make sense to anyone??&#60;/p&#62;
&#60;p&#62;pls help!!&#60;br /&#62;
thanks in advance!
&#60;/p&#62;</description>
</item>
<item>
<title>ziv.seemann on "I need help!!"</title>
<link>http://www.FEA-Forums.com/topic/154#post-182</link>
<pubDate>Wed, 10 Mar 2010 00:30:07 +0000</pubDate>
<dc:creator>ziv.seemann</dc:creator>
<guid isPermaLink="false">182@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;Hello I'm a new user with comsol but i know my way around,&#60;br /&#62;
I need to solve a heating problem in a closed space.&#60;/p&#62;
&#60;p&#62;In order to do so I'm using comsol multiphysics - incompressible naviar stokes and convection and conduction.&#60;/p&#62;
&#60;p&#62;After defining the geometry, boundary and subdomains I solved the heat only and then the whole problem, I got an error something like sqrt(-1).&#60;br /&#62;
see file at &#60;a href=&#34;http://rapidshare.com/files/361389700/didnt_work.mph&#34; rel=&#34;nofollow&#34;&#62;http://rapidshare.com/files/361389700/didnt_work.mph&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Where did I go wrong?&#60;/p&#62;
&#60;p&#62;And another question:&#60;br /&#62;
If I'm trying to use a fan and I want to set the boundary I have only velocity boundary that fits,&#60;br /&#62;
But I need to enter a source (Q) to the equation so how do I do it?&#60;/p&#62;
&#60;p&#62;I'm attaching the file that i made&#60;/p&#62;
&#60;p&#62;Thanx!!!!!!!
&#60;/p&#62;</description>
</item>
<item>
<title>AlexZinchenko on ".dxf import"</title>
<link>http://www.FEA-Forums.com/topic/141#post-165</link>
<pubDate>Tue, 19 Jan 2010 06:00:55 +0000</pubDate>
<dc:creator>AlexZinchenko</dc:creator>
<guid isPermaLink="false">165@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;hi all!&#60;/p&#62;
&#60;p&#62;I have problems with .dxf import in COMSOL..&#60;/p&#62;
&#60;p&#62;even with the simplest 3d objects like sphere comsol import it as 2d image&#60;/p&#62;
&#60;p&#62;any suggestions?&#60;/p&#62;
&#60;p&#62;.dxf file I've created in Maple13&#60;br /&#62;
does anybody know any other CAD program that can draw 3d surface by giving equation?&#60;/p&#62;
&#60;p&#62;please help,&#60;br /&#62;
Alex
&#60;/p&#62;</description>
</item>
<item>
<title>rr00053 on "COMSOL HEAT MODULE"</title>
<link>http://www.FEA-Forums.com/topic/77#post-99</link>
<pubDate>Fri, 20 Feb 2009 14:18:54 +0000</pubDate>
<dc:creator>rr00053</dc:creator>
<guid isPermaLink="false">99@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;hi everyone.... i am doing a simulation using COMSOL ... does anyone in here have come across heating a solid with laser (pr any em wave source). I would like to model the interaction of em waves to metals.... can anyone halp me???? or tell me in which module should i try this?
&#60;/p&#62;</description>
</item>
<item>
<title>alienator on "comsol/capacitor simulation"</title>
<link>http://www.FEA-Forums.com/topic/76#post-98</link>
<pubDate>Fri, 20 Feb 2009 06:42:00 +0000</pubDate>
<dc:creator>alienator</dc:creator>
<guid isPermaLink="false">98@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;hi all ,&#60;/p&#62;
&#60;p&#62;am working with annular capacitors ,&#60;br /&#62;
made a simulated annular plates capacitor in Comsol&#60;/p&#62;
&#60;p&#62;but my experimental results are not matching with the experimental results&#60;br /&#62;
experimental capacitance's are far smaller than the simulated ones&#60;/p&#62;
&#60;p&#62;ex: actual capacitance for 3 mm distance is 1.4 pf&#60;br /&#62;
by simulation we am getting around 14pf&#60;/p&#62;
&#60;p&#62;in Comsol i used : electrostatics module in AC/DC -3D module&#60;/p&#62;
&#60;p&#62;i made 2 annular plates and 2 guard rings around them , and one more big box surrounding all of them&#60;br /&#62;
(guard rings are just 2 grounded rings surrounding both the capacitor plates , one with +ve potential other with -ve potential to reduce the effect of external disturbances on capacitance )&#60;/p&#62;
&#60;p&#62;in sub domain settings i have deactivated all except the big box in which i have put field and other stuff active , have put epsilon(relative) as 1 .&#60;/p&#62;
&#60;p&#62;now for boundary settings i gave zero charge or symmetry for the bigger box , ground for both guard rings , -1V for one plate , and set port as input for other plate ,&#60;/p&#62;
&#60;p&#62;when i simulate this i am getting results which are not matching with experimental values&#60;/p&#62;
&#60;p&#62;so somebody plzz help me out
&#60;/p&#62;</description>
</item>
<item>
<title>mtabesh on "PDE module"</title>
<link>http://www.FEA-Forums.com/topic/73#post-95</link>
<pubDate>Fri, 13 Feb 2009 12:42:00 +0000</pubDate>
<dc:creator>mtabesh</dc:creator>
<guid isPermaLink="false">95@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;Hello everybody&#60;/p&#62;
&#60;p&#62;I am using time dependant PDE module in FEMLAB(COMSOL). I was wondering if anybody can help me with this question.&#60;br /&#62;
How can I save values of an expression at specific times to be used during solution process.&#60;br /&#62;
Thanks in advance.
&#60;/p&#62;</description>
</item>
<item>
<title>jvdb on "Scripting in COMSOL Multiphysics 3.3a"</title>
<link>http://www.FEA-Forums.com/topic/68#post-90</link>
<pubDate>Wed, 24 Dec 2008 04:46:44 +0000</pubDate>
<dc:creator>jvdb</dc:creator>
<guid isPermaLink="false">90@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;Dear all&#60;/p&#62;
&#60;p&#62;I am a newbie to the field of FEA, so I apologize if the answers to my questions are rather obvious. I am working with Comsol 3.3a. I would like to solve a structural problem on a volume mesh (tetrahedrals). I have created a mesh in Matlab and I am using the Comsol scripting language in the Matlab environment. Subsequently, I export the femmesh structure to Comsol. Yet, does anyone has an idea of how to attribute certain subdomains on self-created meshes with scripting? At this moment, I only have a femmesh.&#60;/p&#62;
&#60;p&#62;Code (with node and elem the tetrahedral coordinates and elements): &#60;/p&#62;
&#60;p&#62;el = cell(1,0);&#60;br /&#62;
el{1} = struct('type','tet','elem',elem');&#60;br /&#62;
m = femmesh(node',el);&#60;br /&#62;
m = meshenrich(m);&#60;br /&#62;
fem.mesh=m;&#60;/p&#62;
&#60;p&#62;Furthermore, when looking at this mesh in Comsol, it looks exactly the same as the one in Matlab, yet the boundaries (faces) do not equal, i.e. they are less detailed.&#60;/p&#62;
&#60;p&#62;Thanks&#60;/p&#62;
&#60;p&#62;Jan.
&#60;/p&#62;</description>
</item>
<item>
<title>hesamilati on "summation of Eigen functions"</title>
<link>http://www.FEA-Forums.com/topic/27#post-32</link>
<pubDate>Tue, 01 Jan 2008 07:57:47 +0000</pubDate>
<dc:creator>hesamilati</dc:creator>
<guid isPermaLink="false">32@http://www.FEA-Forums.com/</guid>
<description>&#60;p&#62;Hi&#60;br /&#62;
I have two equation in my problem ((1) Eigen Value Problem + (2) Poisson Equ.). I want to use summation of eigenfunctions of first equation in second equation as a source term. however, I dont know how to use eigen functions of first equation in second equation.&#60;/p&#62;
&#60;p&#62;Please help me!&#60;br /&#62;
Sincerely yours!
&#60;/p&#62;</description>
</item>

</channel>
</rss>

