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

Divergence VS Dimensions

$
0
0
Good Morning,
I performed different simulations of flat coils to see the magnetic flux density without any error and results look reasonable.
The problem is that when I reduce the size of the flat coil (Diameter=30 [mm] , wire diameter=1 [mm]), and choose a finer mesh, Comsol fails to find a solution:

Failed to find a solution.
Divergence of the linear iterations.
Returned solution is not converged.

I am using Magnetic Fields physic. Should I use a different physic for very small devices?
Is the divergence because of the very small size?

Thanks,
Nima.

assigning material

$
0
0
is there any way to assign material object made by surface??

[RF module, Mie scattering Problem] Why is time averaged power flow still dependent on time (or phase)?

$
0
0
Hello everyone,

Thanks in advance for any response and comments on the following problem I met in my modeling:

In my simulation of light scattered off gold nanoparticles, after computing the scattered fields, I made slice plots of power flow to see how the power is transported. I also changed the phase of solution to view the solution at different angles (phase), and you can find in the attachment where I changed the phase of solution. I found that while ewfd.Poavx (y, z) is invariant with changing of phase, which is also consistent with physics, the quantity ewfd.relPoavx (y, z) is changing upon changing of phase, which is contradictory to physics.

In COMSOL, all these quantities are predefined where ewfd.Poavx (y, z) is called "Power flow, time average, x (y ,z) component" and emw.relPoavx (y, z) is called "Power flow of the relative fields, time average, x (y, z) component", respectively. My question is, if all these quantities are already time averaged, why are they still dependent on phase? It seems that COMSOL deals correctly with the power flow of total fields (ewfd.Poavx (y, z)), but it may do something wrong with the power flow of relative fields or scattered fields (emw.relPoavx (y, z)).

Does anyone have some clue to solve this? Any suggestion is welcome.

Thanks a lot,
Song

How to use the operators-' env and bndenv '?

$
0
0
Dear all

The operators ‘env and bndenv’ are available for the Particle Tracing Module. However, I have no idea how to use them, even if I read the user’s guide description as below:
 Evaluating env(expr) on a particle, evaluates expr at the point in the domain where the particle is. When evaluating a variable var on a particle, if the variable is not defined on the particle it is automatically replaced by env(var). Therefore the env operator can often be omitted.
 Evaluating bndenv(expr) on a particle, evaluates expr at the point on the boundary where the particle is. If the particle is not on a boundary, the evaluation fails. Use this operator instead of env when evaluating expressions that are only defined on boundaries.

Does anyone take a example to use the operators?

I would be pleasure if anyone respond the problem.

Solving a 2D fokker planck equation in comsol

$
0
0
Hi,
This is Sarita, a grad student at Hopkins. I have a license for comsol 4.3 through school . I attended the COMSOL workshop at Hopkins on 3/27/14 and was asked to submit a support case for my problem. I thought I might also get help putting it on the forums.

I am trying to solve a PDE in 2D using the coefficient form PDE unit.
The equation looks like-
dudt - d2u/dx2 - (1/epsilon)d2u/dy2 - d/dx(f(x,y)u) - d/dy(g(x,y)u)

where function f is linear in x and y and g is nonlinear in y
f=constant1*(x-y);
g=constant2*((y^2-1)*y-K(x-y));

where K is also a constant.

The constraints I have are that u is a probability and hence it should be conserved to the initial value (=1). That is the quantity should always sum upto 1 at every time step.
The boundary conditions are that the probability goes to zero at the boundaries.

I have a square shaped domain, with values of x and y both ranging from -2 to 2.

The initial condition is a delta function which looks like this
u(x,y,0) = delta(x+1)*delta(y+1)
which means that u =1 at (-1,-1) and is equal to zero at all other points on the domain at the initial time point.

I have attached my mph file with this email. The value u is not conserved using this method. It does not get normalized. The way I implemented the delta function is that I created an extremely small square domain at (-1,-1) and said that the value u is equal to 1 at t=0 in that domain. I also have zero flux conditions to make sure that u does not flow out of the boundaries.

It would be of great help if you could look into this. Please let me know if there is anything unclear or any other information that you need. Thanks a lot!!!

Retrieving data in Matlab via LiveLink

$
0
0
Hi,

I'd like to retrieve some data from my Comsol Model via Matlab/LiveLink.
To be more specific:

I want to get the data of a displacement (u2) at the last timestep of my simulation (at 2.5 seconds) on the lower edge of a rectangle.

But how do I specify the lower edge?
I tried

mpheval(my_model, 'u2','t','25','selection','2')

in which '2' should be the selection number of the lower edge (at least this is number displayed, when I'm choosing the lower boundary for boundary conditions).

But that doesn't work.

Matlab claims that the selection with Tag 2 is unknown.

Please help me!

Best regards,
Simon

plot transient solution

$
0
0
Hello, I have a problem to plot my transient solution and I hope someone can help me.
I am solving a transient two-dimensional advection-diffusion problem through the transport of diluted species module. The wind speed and diffusivity both vary in time, but not continuously, they assume constant values for each interval of time. To include this variation in my model, I criated two steps time, each one corresponding to the desired variation for the wind speed and eddy diffusivity. When I try to see the evolution of my solution in time, I just can see that corresponding to the last step time. It was if the former was erased by comsol.
Any tip is appreciated.
Thanks,
Joana.

Water Temperature in Induction Coil

$
0
0
Is there a way to define a domain/boundary for the inlet and outlet flow of water in a multi-turn coil using the induction heating interface? My model is similar to the "Inductive Heating of a Copper Cylinder" model. I just modified it a bit to coincide with my lab set-up. I am monitoring the water inlet and outlet temperature experimentally so I want to make sure that these measurements and my model's predictions are consistent.

Thanks in advance!

Cursor Coordinates in COMSOL 4

$
0
0
Is there a way to easily display the current cursor location co-ordinates in the 3D graphics view in COMSOL 4.0a? I used the status bar display often to decide where to place slices for slice plots etc. in version 3.4a and cannot see an obvious way to do the same in the new version.

Work on COMSOL through MATLAB?

$
0
0
Hi,

I would like to run COMSOL through MATLAB but don't understand how? For example when I have saved a COMSOL simulation as M-file and tries to open it in MATLAB it won't open and I am not sure how to open the program in COMSOL in MATLAB. I tried to read the information in help but I don't get it. I didn't install the programs on this computer so I am not sure how it was installed.

Basically my end goal is that I want to save the solutions from COMSOL in MATLAB to be able to use them for further calculations in MATLAB. Is it possible and how can I do this?

For example, I have a certain parameter (a refractive index as input) that I sweep and get different effective refractive indexes. I would like to store these in MATLAB and then use it for calculations in MATLAB. How can I do this?

Edit:

I have MATLAB R2010B 64BIT, COMSOL4.1, MATLAB was installed first. I uses a Mac computer.

Many thanks for any help!

Step function

$
0
0
Very simple question, but I can't find out how to do it.

I have a external temperature, "Temperature 1", which is 100 C. After 330 seconds I would like it to drop 80 degrees to 20 degrees. I should be able to use a step funtion, but can't figure out how to. An easier approach is also very welcome. Thanks in advance!

How to export data in excel format?

$
0
0
Hey Ivar,
I want to export my figure into excel format. and replot it in matlab. Is it possible ?
Thank you very much!!

Baofeng

Modeling of saturated and unsaturated soil with time dependent boundary condition

$
0
0
Hi
I am a very new user of COMSOL. At first stage I want to model a rectangular domain of soil which is saturated in lower part (below the water table) and unsaturated above water table. At the left boundary there is a time depend condition that the pressure change by time as a sine function of time. I want to consider the pressure changes along water table level due to this boundary condition. Are there any examples or documents available that could help me to do this?
Thank you in advance
Amir

Negative port impedance

$
0
0

Hi All,

I am currently doing some antenna modeling. The antenna is excited by a 50 Ohm coaxial port. I get reasonable S11 results at resonance but the lumped port impedance is negative e.g. -5 Ohms. This doesn't comply with the S11 value and how can a port impedance become negative at all?

Meshing?

Cheers
Edgar

Is there an easy way to create a high number of geometric components with a random roughness component?

$
0
0
Hi all,

I am using COMSOL 4.3 to simulate a 2D photonic crystal waveguide made of air holes in a dielectric (using the emw study of the RF module), and I wish to look at how roughness around the holes (as will be inevitable from the eventual fabrication) affects the confinement of light in the waveguide. I have been wondering how to create the surface roughness, and I have come up with two solutions, neither of which are desirable:

1) Using MATLAB, I can create a script which will give the x and y coordinates for an appropriate rough circle (using the random number generator in a clever way). This can be read in to COMSOL as an interpolation curve, and there we have the first rough circle. Now, we need many circles to create the crystal. The easy way out is just to copy the one random rough circle into an array, but this is in no way good enough.

2) Same as above, but with several circles. I.e., creating several txt files from the matlab script, and importing each into an interpolation curve. Ideally this should be done for each 'circle', but it might be way to time-consuming, depending on the size of the crystal. One idea here would be to create enough 'circles', and placing them in a 'random' way, while being careful not to get any periodicity in the placement (i.e., if we have circle 1,2,3, we would not like them placed 1 1 3 2 1 1 3 2, etc...).

Probably both of these solutions are just a substitute for actual knowledge of the geometry part of the simulation tool: There must be an easier way to do this? I would suspect that it is possible to create the geometry in CAD, and importing it to COMSOL: Is there an easier way to do this with CAD software? Any other ideas?

I sincerely appreciate any help on this!

Cheers,
Marius

Edit: It would be extremely nice if there was a way which would let me redefine the roughness (i.e. the expected frequency and amplitude of the error from a perfect circle) so I can find some threshold for when the light will be guided and not... Again, I will be grateful for any help on this one...

How to calculate the transmission

$
0
0
Dear all,

I have a question about how to calculate the trasmission through the nanostructure.
For example, in the "Optical Scattering Off of a Gold Nanosphere" tutorial, we tell comsol to solve for "scattered field" and also use "far field domain".

If I want to know how much light is transmitted in this model, how can I get it?
My idea for solving this problem is to integrate "emw.normEfar^2" in the far-field boundary, but it seems to be a wrong strategy for getting the transmission(unit : %).

Could you let me know how I can calculate the transmission when I use "scattered field"?

Two-Phase flow with Fluid Particle Interaction

$
0
0
Hi,
I am using Comsol 4.3 to model a two phase flow of immiscible fluids. I would like to add the Particle Tracing for Fluid Flow physics with a Fluid-Particle Interaction to solve for the flow field and particle position solutions simultaneously. Does anyone know if this is possible in Comsol?

Thanks!

PML width for Longer wavelength

$
0
0
I generally use the wavelength(in case of shorter wavelength)as the starting PML width. This does not create a large geometry to solve, saving some memory. But, my recent models have longer wavelengths. These are several magnitudes higher than the resonators actual size which I am modelling. Creating a PML as large as the wavelength does not make any sense. What could be a better way to find a starting PML width?

Thanks.

batch mode run time limitation

$
0
0
Hello everyone,
I have a set of models that I want to run in a .bat file as follows:

"C:\Program Files\COMSOL\COMSOL44\bin\win64\comsolbatch" -inputfile D:\temp\test1.mph
"C:\Program Files\COMSOL\COMSOL44\bin\win64\comsolbatch" -inputfile D:\temp\test2.mph
"C:\Program Files\COMSOL\COMSOL44\bin\win64\comsolbatch" -inputfile D:\temp\test3.mph
. .
.

However I need to define a run time limit of 30minutes for each model. So if each of them is now finished in 30 min I want it to be killed and continue to run the next model.

Can anyone help me through this.
Thanks in advance
Ehsan

Problems in Electromechanics in contact analysis.

$
0
0
Hi,
I want to model a capacitor whose top plate is to be pulled down upon the bottom plate under a large bias voltage(above the pull-in voltage). Electromechanics physics with stationary study is employed for simulation. Contact pairs are defined on the bottom of top plate and the surface of the bottom plate. Identity pairs are also defined between the plate and the air gap.
At the first stage, only an external force is applied as the boundary load without any bias voltage for simulating the contact phenomenon. The top plate contacts to the bottom plate as expected.
Then a DC voltage is applied as the terminal condition with a ground condition, but the Segregated solver cannot converge! Because the gap is air, in the emi physics the Identity pairs could not be set asContinuity condition.
I guess that the problem is caused by the geometry of assembly. For I change to "Form union" to build the geometry, the top plate is deflected as expected. But the "assembly" geometry is necessary for contact analysis.
I don't know how to set the condition for applying electrical voltage in contact analysis. It has confused me for some days.
Would you please give me some advices? Thanks a lot!
Viewing all 26512 articles
Browse latest View live