Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Urgent help: Mapping the velocity of solids using current solution after remeshing
Posted Feb 19, 2011, 5:54 a.m. EST MEMS & Nanotechnology, MEMS & Piezoelectric Devices, Microfluidics, Structural Mechanics Version 3.5a 0 Replies
Please login with a confirmed email address before reporting spam
I am simulating motion of the solid particle (a cylinder in 2D simulation) in the flat fluid channel. ALE defomable mesh and weak constraints are used. Remeshing is also necessary.
The problem I am encountering is that, after each remeshing, the location of the solid cylinder (u,t) and the flow velocity (u2,v2) of the fluid is correctly mapped. However, the solid's velocity (ut,vt) is not. They were set to 0 at each execution of remeshing. So the solid experience an acceleration process after each remeshing, which is definitely wrong, because remeshing in this precess is very frequent. I tried to map all the values in the asseminit function, but it does not work.
THe key code is listed below. I hope the experts and friends here can help me to solve this problem.
PS. I am using version 3.5a.
Many Thanks.
while t_st<5.0
if t_st>0.0e0
% mapping current solution to extended mesh
init = asseminit(fem,'init',fem0.sol,'xmesh',fem0.xmesh,'framesrc','ale',...
'outcomp',{'lm4','lm3','u2','p2','v2','v','u','lm6','lm5','y','x','Y','X','ut','vt'});
end
if t_st==0.0e0
fem.sol=femtime(fem, ...
'blocksize',1000, ...
'atol',{'0.02'}, ...
'solcomp',{'lm4','lm3','u2','p2','v2','v','u','lm6','lm5','y','x'}, ...
'outcomp',{'lm4','lm3','u2','p2','v2','v','u','lm6','lm5','y','x','Y','X','ut','vt'}, ...
'tlist',[0:deltat:5.0], ...
'maxorder',2, ...
'tout','tlist', ...
'estrat',1, ...
'stopcond','minqual1_ale-0.1', ...
'uscale','none');
else
fem.sol=femtime(fem, ...
'init',init,...
'blocksize',1000, ...
'atol',{'0.02'}, ...
'solcomp',{'lm4','lm3','u2','p2','v2','v','u','lm6','lm5','y','x'}, ...
'outcomp',{'lm4','lm3','u2','p2','v2','v','u','lm6','lm5','y','x','Y','X','ut','vt'}, ...
'tlist',[t_st:deltat:5.0], ...
'maxorder',2, ...
'tout','tlist', ...
'estrat',1, ...
'stopcond','minqual1_ale-0.1', ...
'uscale','none');
end
% Save current fem structure for restart purposes
fem0=fem;
% Get final time from solution
% Use a point where the particle can be located at any time point
% Here a position at the centre of the cylinder [xc,yc]
t_st=postinterp(fem,'t',[xc;yc])
solution{j}=fem;
% update structure and generate new mesh
fem=mesh2geom(fem,'srcdata','deformed','frame','ale','destfield',{'geom','mesh'});
fem.mesh=meshinit(fem,'hgrad',1.15);
end
% End loop
Hello Zirui Li
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.