Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all 26447 articles
Browse latest View live

Regarding Domain Materials

$
0
0
Dear All,

I tried to create a geometry for real surface data (as avilable in .txt file) using parameteric surface and Interpolation function alraedy inbuilt in COMSOL. In real situation, whole data is NOT OF SAME MATERIAL, so I need to replicate the same in my comsol geometry.
But comsol assigns materials in domain only.
Is there any way, I can assign different materials for same domain?
If not so, is there any other solution for my probem?


--------------
Asha Sharma

Formatting Figure Report

$
0
0
Is there a way to format the images that are generated in a comsol brief report? When I generated the report the legend was overlapping with the figure, and some of the numbers on the scale were cut off.

Adding electrical circuit in 3D geometry

$
0
0
Hello everyone. I am shamor. I have made an elliptical shape geometry containing a fluid (conductivity 1.5). My geometry has two long electrode (for current carrying) and four small electrode (for potential measurement). Small electrodes will be shorted with resistor from outside. And I want to measure the potential between two nodes of shorted electrode. For that i have read "Inductor in an Amplifier Circuit" in detail from AC/DC application builder. But I have been facing some problem with geometry node and my Lt spice circuit node.
What should I do now? Is there any alternative literature about that problem?

Regards
Shamor

Fluid Structure Interaction with Piezoelectric

$
0
0
I was wondering if someone could help me figure out how to model the fluid structure interaction using the piezoelectric device physics model as well. I am trying to model synthetic jet actuators and I am having a hard time coupling the physics together to make the model work. I am new to the fluid structure interaction model so that is probably where my issues are. I am able to get the piezo element to deflect but im not sure how to tie it to the brass element so that deflects and then that deflection causes the fluid in the cavity to displace. If anyone could help me that would be great.

Thanks,
Aaron

Adding an extra dimension to 1-D battery model

$
0
0
Hi all,
I am working on modeling and simulation of Li-ion battery. My model is pseudo-2-dimensional one. So I need an extra dimension to consider diffusion equation in solid phase of porous electrode in radial-direction while other equations are assumed in x-direction. I do not know how to do that. Please help me.

Integrate extra dimension

$
0
0
Hi, All,

I am modelling an LED using comsol and currently facing a problem of integrating an extra dimension variable over the base geometry which is a 2D square. The extra dimension variable is obtained from the Optical Transitions in the Semiconductor Physics. The variable's name is the emitted power per unit volume and energy (1/(m^3*s)) (semi.ot1.dP_dE) from which I would like to calculate the LED emitted power over a boundary of the based geometry.
Currently, I can only obtain the "semi.ot1.dP_dE" for a specific point on the boundary using the following command:

"comp1.atxd2(5e-6, 10e-6, semi.ot1.dP_dE)"

where 5e-6 and 10e-6 are the x and y coordinate.

Anyone can help how to intergrate "semi.ot1.dP_dE" over a boundary?

Many thanks!

LED spectrum

$
0
0
Hello,

I have built a 1D MQW LED model.
And I use the follow expressions to generate the spectrum plot:
y-axis: comp1.atxd1(0.107e-6, semi.ot1.dP_dE)
x_axis: hbar_const*comp1.atxd1(0.107e-6, semi.ot1.omega)/e_const
So, I got the spectrum generated by the point: 0.107e-6, and the result matches my expectation.
But now I want to see the spectrum of the whole 1D model instead of just one point. Can anyone help me with the expressions?

Thanks a lot!

Books or tutuorials to understand FEM.

$
0
0
Hi,
I have been trying to understand the fundamental of finite element analysis (FEM). I have looked for tutorials on youtube, books in my college library, however, i am not able to relate the theoretical examples and derivations they teach in the books and tutorials with COSMOL software. Can anyone suggest me any source from where i can understand the FEM w.r.t COMSOL software.

Thanks

Cyclic symmetry with LiveLink MATLAB

$
0
0
Dear, all

Hi, I'm trying to extract the result from structural frequency response with MATLAB.
The model I used is a quarter of PMSM stator, and I applied the cyclic symmetry condition in the solid mechanics physics.

I need the displacement, velocity or acceleration on the surface of the full stator model because the following step will be the acoustic analysis with BEM.

Although it can be visualized with sector 3D feature, however, I don't get how it be extracted with LiveLink MATLAB for full model.

Is anyone can give tips or help?

Meshing a heat exchnager 3D model

$
0
0
Hello,

I have model a heat exchanger inside the COMSOL geometry module. I would like to test the model with turbulent fluid flow and heat transfer. I am facing problems while meshing. I am receiving error for " low minimum element quality". I read other blog regarding this topic but i could not figure out the problem's solution.

How inaccurate the results will be with mesh quality of 0.0020 ?

Can anyone help me to solve this issue ?

Regards,
Drumil Patel

Surface-Enhanced Raman Scattering (SERS)

$
0
0
Hi everyone,

We would like to do some theoretical calculations of Surface-Enhanced Raman Scattering (SERS) using COMSOL. We know that there is strong plasmon coupling in between Gold nanoparticles, and we would like to analyze the plasmon resonances in the gold nanoparticles, such as the accumulation of an electric near field at the surface. For that reason, we consider two Gold spheres of 70nm in diameter with a gold-to-gold gap distance 1.5nm. Excitation with monochromatic light (785nm) parallel to the z-axis.
The thing is that we do not know how we are going to irradiate the gold nanoparticles. For example, experimentally we have an input power 2.5mW and 20s irradiation with perpendicular, 785nm laser.
We would like to do the analysis in 3D, and we could not find any tutorial on this subject.

Looking forward to hearing from you all soon.

Modeling of two reactions with Mathematics and PDEs

$
0
0
Dear all,

I am working on a model to simulate the hydration of MgCl2.2H2O to MgCl2.6H2O, with an intermidiate reaction MgCl2.2H2O -> MgCl2.4H2O.

In order to do it I use PDEs to calculate the water Mass balance (c) , the Temperature of air (Tair) and the Advancement of the reactions (X2->4 and X4->6 respectively ).

The kinetics of the reaction require a vapor pressure term , pv which i have defined as variable : pv_24=C_24*R*Tair and pv_46=C_46*R*Tair respectively for each reaction.

I use a segregated solver to calculate it but my problem is that I don't know how to make the simulation do the following :

To calculate the pv_24, then calculate the X_24, and after the C_24.
Then calculate in the same time step the pv_46 which will lead to an X_46 and after a C_46.
After all these in the same time step (in each spacial domain) to calculate the Tair.

If I have understood correctly, Comsol, calculates the variables first, and then all the PDEs.

Please I am relying on your help.

Thank you in advance for your time and help.

Two-way coupling FSI

$
0
0
Hi guys, I'm trying to do a two-way coupling FSI problem where fluid force is transfered to the solid and also external stress from the solid is also imposed on the fluid.
Please how do i go about this?
The only kind of "Study" I see indicated is stationary or Time Dependent "one-way" coupling.

Thanks
Samuel Fagbemi

Flow of water droplet in dielectric medium due to electrostatic force

$
0
0
Hi, there. I am modeling a flow of water droplet in the dielectric medium due to the applied electric field in 2D. I have taken electrostatic, laminar flow and phase field physics and multi physics for modeling two phase flow of air and water. Water is my first fluid and air is the second. I have modeled physics according to Comsol tutorial "Separation Through Electrocoalescence". In my case what should be the phase field function? For water and air? I have taken -1 for water and 0 for air. I tried to solve this for step input of electrical voltage for 7 seconds. For 0.3 seconds, it is solving but when I put large time, it is producing this error-
"Repeated error test failures. May have reached a singularity.
Time : 0.003750230725364472
Last time step is not converged."
Can anybody please guide through this, how to eliminate this error.
And can anybody assure me that my model is correct? I am unable to attach the Comsol file here. If anybody wants I will share the file

Linking Parametric and Material Sweep in COMSOL 5.2

$
0
0
Hi,

I have a model in which both parametric sweep and material sweep are defined. Is it possible to compute the model, such that material and parametric sweep runs in parallel.

To explain more in detail, I have defined a range of values of parameter p1 (say 10 values) in parameter sweep and also defined 10 materials and added them to the material sweep. Now is it possible such that when the model is computed, for the first value of parameter, first material in the material sweep in considered and for the second value of the parameter second material is chosen and so on.

So far from what I browsed, I understand that these two can be done easily when taken one at a time.

Can someone help me in this issue.

Regards,
Ashitosh

Unexpected unit of input error (Heat transfer in solids)

$
0
0
Hi,
I'm modeling skin and hair heating by laser beam distributed as Gaussian, very similar to the tutorial of: laser_heat_transient_pulsed.mph, only my model is 2D axisymmetric
I set the parameters: Ac (absorption coefficient) [1/m], Rc (refractive index) [unitless], Q0 (max laser power) [W], r_spot (laser radius) [m].
the variable I try to set is:
Q0*(1-Rc)*Ac*(1/(pi*(r_spot^2)))*an1(r)*exp(-Ac*abs(z))*an2(t)
where an1(r) is the Gaussian beam distribution: exp(-((r^2)/(2*(r_spot)^2)))
and an2(t) is a rectangle 3 pulses of laser.
I have an error of "Unexpected unit of input" on the Q0*(1-Rc)*Ac*(1/(pi*(r_spot^2)))*an1(r)*exp(-Ac*abs(z))*an2(t) expression, also if i remove the pulsed part of an2(t).

Can you please advise what is wrong with the expression?
Thanks a lot!
Anna

Transient Acoustic Model with turbulent flow

$
0
0
Hi,

I want to simulate a bassreflex speaker with a bad port-design (too small, sharp edges).
I would like to do it in 3D, but as a first step, 2D is also ok.

Is there a way to use turbulent flow physics throughout the whole model, without the need to couple to acoustics module?
Also, I'm not sure which turbulence model to use. k-ω seems to be a good choice...

Thanky in advance!

Best Wishes

Increase stiffness by adding more stiffer material in optimization

$
0
0
Please, find the matlab code below. I have a 2D model. The base material (mat1) has the young modulus (E1) of 1 and poisson ratio of 0.3. The compliance is 52.79. In order to reduce the compliance (increase the stiffness) of the model, I added a strip of material (mat2) which young modulus (E2) is 5 and poisson ratio equals 0.3. This reduces the compliance of my model to 50.23. I want to run an optimization using the livelink to add more mat2 to my model in order to minimize the compliance further to 43. How can I use mat2 as the design variable? Thank you

% Matlab code
%.................................................................................

function f = two_materials
%
% two_materials.m
%
% Model exported on Sep 3 2017, 06:19 by COMSOL 5.2.1.152.

import com.comsol.model.*
import com.comsol.model.util.*

model = ModelUtil.create('Model');

model.modelPath('C:\Users\sayinde\Dropbox\demo for diff materials');

model.label('two_materials.mph');

model.comments(['Untitled\n\n']);

model.modelNode.create('comp1');

model.geom.create('geom1', 2);

model.mesh.create('mesh1', 'geom1');

model.geom('geom1').create('b1', 'BezierPolygon');
model.geom('geom1').feature('b1').set('p', {'-1.5' '-1.5' '-0.5' '-0.5' '0.6' '0.6' '-1.5'; ...
'0.7' '-0.3' '-0.3' '-0.1' '-0.1' '0.7' '0.7'});
model.geom('geom1').feature('b1').set('w', {'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' ...
'1' '1'});
model.geom('geom1').feature('b1').set('degree', {'1' '1' '1' '1' '1' '1'});
model.geom('geom1').create('b2', 'BezierPolygon');
model.geom('geom1').feature('b2').set('p', {'-1.3' '-1.3' '-0.9' '-0.9' '-1.3'; '0.3' '0.5' '0.5' '0.3' '0.3'});
model.geom('geom1').feature('b2').set('w', {'1' '1' '1' '1' '1' '1' '1' '1'});
model.geom('geom1').feature('b2').set('degree', {'1' '1' '1' '1'});
model.geom('geom1').run;
model.geom('geom1').run('fin');

model.material.create('mat1', 'Common', 'comp1');
model.material.create('mat2', 'Common', 'comp1');
model.material('mat1').selection.set([1]);
model.material('mat1').propertyGroup.create('Enu', 'Young''s modulus and Poisson''s ratio');
model.material('mat2').selection.set([2]);
model.material('mat2').propertyGroup.create('Enu', 'Young''s modulus and Poisson''s ratio');

model.physics.create('solid', 'SolidMechanics', 'geom1');
model.physics('solid').create('fix1', 'Fixed', 1);
model.physics('solid').feature('fix1').selection.set([1]);
model.physics('solid').create('pl1', 'PointLoad', 0);
model.physics('solid').feature('pl1').selection.set([9]);

model.view('view1').axis.set('abstractviewrratio', '0.17300830781459808');
model.view('view1').axis.set('abstractviewlratio', '-0.055711157619953156');
model.view('view1').axis.set('abstractviewxscale', '0.005181347019970417');
model.view('view1').axis.set('abstractviewbratio', '-0.4787564277648926');
model.view('view1').axis.set('xmax', '0.6794240474700928');
model.view('view1').axis.set('xmin', '-1.5255756378173828');
model.view('view1').axis.set('abstractviewyscale', '0.005181347019970417');
model.view('view1').axis.set('ymax', '0.9334676861763');
model.view('view1').axis.set('ymin', '-0.8447578549385071');
model.view('view1').axis.set('abstractviewtratio', '0.20518136024475098');

model.material('mat1').label('E=1 poison =0.3');
model.material('mat1').propertyGroup('Enu').set('youngsmodulus', '1');
model.material('mat1').propertyGroup('Enu').set('poissonsratio', '0.3');
model.material('mat2').label('E=5 poison=0.3');
model.material('mat2').propertyGroup('Enu').set('youngsmodulus', '5');
model.material('mat2').propertyGroup('Enu').set('poissonsratio', '0.3');

model.physics('solid').feature('pl1').set('Fp', {'0'; '-1'; '0'});

model.mesh('mesh1').run;

model.study.create('std1');
model.study('std1').create('stat', 'Stationary');

model.sol.create('sol1');
model.sol('sol1').study('std1');
model.sol('sol1').attach('std1');
model.sol('sol1').create('st1', 'StudyStep');
model.sol('sol1').create('v1', 'Variables');
model.sol('sol1').create('s1', 'Stationary');
model.sol('sol1').feature('s1').create('fc1', 'FullyCoupled');
model.sol('sol1').feature('s1').feature.remove('fcDef');

model.result.create('pg1', 'PlotGroup2D');
model.result('pg1').create('surf1', 'Surface');
model.result('pg1').feature('surf1').create('def', 'Deform');

model.sol('sol1').attach('std1');
model.sol('sol1').runAll;

model.result('pg1').label('Stress (solid)');
model.result('pg1').feature('surf1').set('descr', 'von Mises stress');
model.result('pg1').feature('surf1').set('unit', 'N/m^2');
model.result('pg1').feature('surf1').set('expr', 'solid.mises');
model.result('pg1').feature('surf1').set('resolution', 'normal');
model.result('pg1').feature('surf1').feature('def').set('scale', '0.002963085086206459');
model.result('pg1').feature('surf1').feature('def').set('scaleactive', false);

model.sol('sol1').study('std1');

model.study('std1').feature('stat').set('notlistsolnum', 1);
model.study('std1').feature('stat').set('notsolnum', '1');
model.study('std1').feature('stat').set('listsolnum', 1);
model.study('std1').feature('stat').set('solnum', '1');

model.sol('sol1').feature.remove('s1');
model.sol('sol1').feature.remove('v1');
model.sol('sol1').feature.remove('st1');
model.sol('sol1').create('st1', 'StudyStep');
model.sol('sol1').feature('st1').set('study', 'std1');
model.sol('sol1').feature('st1').set('studystep', 'stat');
model.sol('sol1').create('v1', 'Variables');
model.sol('sol1').feature('v1').set('control', 'stat');
model.sol('sol1').create('s1', 'Stationary');
model.sol('sol1').feature('s1').create('fc1', 'FullyCoupled');
model.sol('sol1').feature('s1').feature('fc1').set('termonres', 'auto');
model.sol('sol1').feature('s1').feature('fc1').set('reserrfact', 1000);
model.sol('sol1').feature('s1').feature('fc1').set('linsolver', 'dDef');
model.sol('sol1').feature('s1').feature('fc1').set('termonres', 'auto');
model.sol('sol1').feature('s1').feature('fc1').set('reserrfact', 1000);
model.sol('sol1').feature('s1').feature.remove('fcDef');
model.sol('sol1').attach('std1');
model.sol('sol1').runAll;

model.result('pg1').run;

FA = mphmatrix(model, 'sol1', 'out', {'K','E'});
K = FA.K; % stiffness vector
% solve directly from constrained matrices
MA = mphmatrix(model ,'sol1','Out', {'Kc','Lc','Null','ud','uscale'},'initmethod','sol','initsol','zero');
Uc = MA.Null*(MA.Kc\MA.Lc);
U0 = Uc+MA.ud;
U1 = U0.*MA.uscale;
compliance = U1'*K*U1; % u is the global displacement I want to use to compute the compliance
assignin('base','compliance',compliance)

f = compliance;

mphgeom(model)

end


Measuring diameter of a contour

$
0
0
Hi ,

I am simulating tumour ablations and need to measure the diameter of the output contour(Iso-therm). I could not figure out a reliable method to do it. That would be great if someone in the community can assist me.

Thanks in Advanced.

CK

Plot z=(x,y) in COMSOL

$
0
0
Dear all

Does anyone know how to make a plot z=(x,y) in comsol ?

I need to make this plot to evaluate my design
Best regards
Viewing all 26447 articles
Browse latest View live