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

undefined variable error (new to comsol)

$
0
0
undefined variable error

variable: comp1.emi.disp
geometry :geom1
boundary:12

failed to evaluate expression
expression:1000000*comp1.emi.disp
plot:surf1
Trying to get a displacement plot for simple CMUT membrane

Liquid marble

$
0
0
Hi everyone.
I am working on liquid marbles. The droplets that are encapsulated with hydrophobic nanoparticles. My question is that :how this powder or nanoparticles are simulated in comsol?is there a mathematical equation for simulating this hydrophobic layer.?for example how the nanoparticles are simulated when the liquid marble subjected to magnetic field of a permanent magnet?
Please help.

extracting results from COMSOL using livelink for matlab

$
0
0
Hi everyone~
It is trying to do shape optimization involving stationary analysis. The code of optimization method was written by Matlab, and it needs to receive the simulation results from the COMSOL.
For example, in the case study of "Multistudy optimization of bracket", I want to extract the max stress value from the COMSOL using matlab, however I found the result was wrong. Does anyone know why?
Many thanks!


Matlab code :

model = mphload('multistudy_bracket_optimization');%load the model

x=[11.8 2.7 9.0 22.3 9.5 20];% parameters

model.param.set('rC', x(1,1), 'Radius of central hole');
model.param.set('zCo', x(1,2), 'Distance from bend to bottom of central hole');
model.param.set('rO', x(1,3), 'Radius of outer holes');
model.param.set('zOo', x(1,4), 'Distance from bend to bottom of outer hole');
model.param.set('yOo', x(1,5), 'Distance from edge to outer hole');
model.param.set('wInd', x(1,6), 'Width of indentation');
model.hist.disable;

model.sol('sol2').runAll;
Max_Stress = mphglobal(model,{'maxop1(solid.mises)'}); % get the max stress value

global equations (ODE) and global variables

$
0
0
Hi, I'm trying to define an equation in global equations and it is corresponded with the coordinates x and y (or certain global variable), e.g.:

States
Name (u) Equation f(u,ut,utt,t) Init (u)
u u-rho 0

where rho is defined as sqrt(x^2+y^2) in Global Expressions. However, I get an error as follows:

Error: 6170
Failed to evaluate variable.
- Variable: x
- Global scope
Failed to evaluate variable.
- Variable: rho
- Defined as: sqrt(((x)^2+(y)^2))
Failed to evaluate expression.
- Expression: u-rho

I would like to ask if there is a way to define the global equation such that it accepts a global variable like rho? If not, how can I use coupling variable or some other ways to get the coordinates in the whole domain. By the way, how can I obtain the Jacobian numerically in Comsol? Thank you very much for your advice and help!

Parameter estimation

$
0
0
Hello,

I want to determine one parameter k1, which is used over the entire domain. However, objective function values should be compared only at a boundary. According to the Optimization user manual, I think I need to use “least square objective" at a boundary and either “control variable field over the entire domain” or “global control variable”. When I try these, I get an error message of “Incorrect number of coordinates in least-squares objective”. Can I define an objective function at a boundary and use a control variable applied to the entire domain so that the control variable can be evaluated over the entire domain in COMSOL? In the attached model, the Optimization module is used in Study 2.

I contacted technical support and heard that they would post a model example in the future (unscheduled for now). If you know how to do it, please advise. I'd greatly appreciate your help!

Damped Eigen frequency Analysis

$
0
0
Hei,

I am working on calculating Q factor from eigenfrequecny analysis using structural mechanics. I know that Q factor= abs(imag)/2*abs(real) but my problem is when I add damping in the form of isotropic loss factor, it would increase the real part too (which is frequency of the system) that should decrease with the increase in damping. Since both the real and imaginary part are increasing simultaneously, there is a little difference in the values of Q factor with or without damping.
I know that adding damping to eigenfrequency gives imaginary frequencies, but I am not sure how to deal with it.
Please give me some suggestions on how to proceed.
Any help would be appreciated.
Regards,
Saleha

COMSOL 5.2 gets stuck after some time

$
0
0
From almost two weeks I am facing this problem that whenever I run a simulation that requires long processing time, I find that the program stops responding. I just get a "waiting" cursor and a (Not Responding) message in the title bar.

I thought it might be due to the latest update for COMSOL 5.2 so I uninstalled the COMSOL program and re-installed v5.2 without the update. But, still it gave me the same problem. I also tried installing the update for it, and still I have the same issue.

I am running the program on Windows 10 Pro 64-bit with 32 GB RAM and i7-4790 processor with a 4GB NVidia GeForce GT730 graphics card.

It used to run fine before but now its frustrating me because its impossible for me to run anything. I waste hours and end up with nothing because the program just hangs up.

Use of coefficient form PDE with global equation (simple ODE)

$
0
0
Dear Sir or Madam,
I am trying to solve a coefficient form PDE "dC/dt+ u.dC/dz =D 1/r.d/dt (1/r.(dC/dr)" with a global ODE equation "dCt/dt=constant*(C(t,L) - Ct)" together. I am using 4.1 version so I know that I can not use C(t,L) with ODE so I replaced it with aveop1(C) which is the average operator for C at the location of L. But I am getting a zero answer across the geometry. Could you please someone help me?




How to plot vorticity

$
0
0
I can visualize only pressure and velocity.

Do you have any ideas about how to get the vorticity for a 3D problem?

Time Dependent Study for Loudspeaker Systems

$
0
0
Hi all,

I am interested in performing a Time Dependent study for loudspeaker systems. As a starting point here, I work with the tutorial model “Loudspeaker Driver in a Vented Enclosure”. Given that I have already studied successfully this model as it is i.e. in the Frequency Domain, I have tried a few things which fail.

(1) I added a second study (Step 1: Time Dependent) to the existing model. Given that this is available only for the Shell interface, I deactivated the Pressure Acoustics Frequency Domain Interface (Study 2 -> Step1: Time Dependent -> Physics and Variables Selection). Then, I ticked "initial values of variables solved for" (Study 2 -> Step1: Time Dependent -> Values of Dependent Variables) and I chose “initial expression” (Method), “Study 1, Frequency Domain” (Study) and a single frequency value from the list (Parameter value (freq(Hz))).

This study cannot be computed because the error “undefined variable, -Variable: shell.u_tz” appears. At this point, I wonder why this variable is also recognized as undefined in the Frequency Domain study of the tutorial model (Component1 -> Definitions -> variables -> av_apex(shell.u_tz)), but for this case, the study is computed successfully.

(2) When I changed further the expression for the electric driving force (Component 1 -> Definitions -> variables -> Fe) by replacing “Vo” with “Vo*sin(omega*t)”, I got the same error.

Is there a way to use the solution from the Frequency Domain study to perform a Time Dependent study?

Could be an alternative approach to work with the Pressure Acoustics Transient Interface? Given that PML layer is not applicable for this Interface, how can outgoing waves be absorbed for this case?

I would highly appreciate a response to these issues.

Fabry-Perot cavity with metal mirror on one side

$
0
0
I want to simulate a Fabry-Perot cavity, one mirror is dielectric mirror with multi-stack coatings, but another one is metal mirror. For metal mirror, I need to include Fresnel reflection losses and also attenuation due to imaginary refractive index.

I know there's a tutor example of Fabry-Perot cavity in COMSOL website, it's using geometric optics model, I already build a nice working Farby-Perot model with this model but it's with two dielectric mirror. Now I change one mirror to metal and include the complex refractive index of the metal, but the result is absolutely not right.

If geometric optics model could simulate my case, if yes, how can I correctly set metal mirror and include the losses. And if geometric optics model is not working, what model should I use? Thank you.

Attempt to evaluate real logarithm of negative number.

$
0
0
Hi, All

I got this error when I run the simulation:

" Attempt to evaluate real logarithm of negative number.
- Function: log
Failed to evaluate variable.
- Variable: comp1.semi.Efp
- Defined as: comp1.semi.Ev-(comp1.semi.Vth*log(comp1.semi.P/(comp1.semi.gamma_p*comp1.semi.Nv))) "

I tried to calculate the component in log (i.e., comp1.semi.P/(comp1.semi.gamma_p*comp1.semi.Nv) ) in Comsol Results and the result shows that this component indeed a positive number with a order about 10^-4~10^-9. If so, why I still face this error?

Can anybody help?

Best regards

Particle-Particle Interaction Cutoff

$
0
0
Hello!

I am trying to use the mathematical particle tracing module to accumulate some particles in a material.
Ultimately I would love to be able to spawn particles, have them travel in some direction then stick to a wall. However, I also do not want them to touch each other.

I figured I could make this happen by using the particle-particle interaction node and applying something like damped force when the particles get close to each other to reach an equilibrium distance.

Anyway, I am running into a problem with the cutoff length I think. I've attached a sample file where I release one particle, let it drift, then release another one some time later. I am using the cutoff length setting, so the first particle shouldn't "feel" any interaction force since the second particle hasn't been released yet. However, it does! I'm not too familiar with this physics set so I don't know exactly how it works, but something doesn't feel right.

Any help would be greatly appreciated.

COMSOL 5.2 Linux version installation

$
0
0
Hi,
I am new to COMSOL. Please help me to get the installer file. It was asking for trial passcode. Can you please help me to get it.

Thanks!
-Dipanjan.

The transition zone is too large. Two transition zones overlap

$
0
0
Hello everyone,

When I use the Rectangle function in Comsol5.2, I set the Lower limit and Upper limit as 0.03029 and 0.
05818, respectively. But it gets an error saying that "The transition zone is too large. Two transition zones overlap". I indeed believe that the accuracy of Comsol is enough, so how can I solve it.

Thanks!

Jiaqing

Couple heat and mass transfer of porous media

$
0
0
I am new in using COMSOL in solving couple heat and mass transfer process. Using transport of dilute species in porous media (tds) and heat transfer in porous media (ht), and finer mesh, i wasn't able to solve the couple multiphysics problem. After running the simulation i got an error message "The following feature has encountered a problem: Invalid variable for lower limit. Feature: Time-Dependent Solver 1 (sol1/t1)", as shown in the attached image. Please, i need someone to help me figure out how to solve the problem.

Graphis Display Overlap

Unsteady incompressible N-S solver

$
0
0
Hello all
I have question about the method used by COMSOL for solving the unsteady incompressible laminar flow. I know it has an option for pressure-correction approach (projection method), but I have no idea about the default method used to deal with pressure.
I would appreciate if you could share some information with me.

Thanks,
Farzad

Undefined value found

$
0
0
Hi,

i can solve my semiconductor model with a relatively coarse mesh.
However the found solution is not good enough. It shows some
differences to a reference (PC1D) semiconductor model.

That is why i want to refine the mesh.


But if i refine the mesh i get following error:

---------------------------------------------------------------------
Error: 7248
Undefined value found.

Details:
Exception:
com.femlab.jni.FlNativeException: Undefined value found Solvermodel
Messages:
Undefined value found Solvermodel

Stack trace:
at solvermodel.cpp, row 1837, (Undefined value found in the equation residual vector.
There are 85 degrees of freedom giving NaN/Inf in the vector for the variable phii
at coordinates: (0.000493076,-5.8675e-005), (0.00049406,-5.80051e-005), (0.000495044,-5.73351e-005), (0.000494026,-5.58557e-005), (0.000493041,-5.65256e-005), ...
)
at com.femlab.solver.FlSolver.femStatic(Native Method)
at com.femlab.solver.FemStatic.run(Unknown Source)
at com.femlab.server.FlRunner.run(Unknown Source)
at com.femlab.util.i.run(Unknown Source)
at com.femlab.util.aa.run(Unknown Source)
----------------------------------------------------------------------------

The model is quite complex and has 5 coupled application modes.
I use the Parametric segregated Solver.

I think if there would be a problem with my initialisation values or boundary contitions,
i would not be able to solve the model even with a coarse mesh?

I found out, that the problem especially occurs, if i refine the mesh in a region with large gradients.

The Comsol solution is represented by green circles and the reference solution is shown as line in the attached figure.

Has anyone an idea how the finer mesh causes "undefined value"-problems and how to overcome them?

Thank you,

Stefan







Calculating Rayleigh Damping Parameters

$
0
0
Hello,
How can one calculate damping parameters (alpha & beta) for a given structure in Comsol?

there is some information about damping in 'smeug.pdf' (pages 140-148, 199, 372). However, it seems that the procedure of the constant calculation is not clear. They address a reader to the Elbow Bracket example (smeug.pdf' pp 36-37). In this example, they assume that "the structure has a constant damping ratio of 0.1."...Actually, if we assume another number we will get different damping parameters.

Please advise,
Stephan


Viewing all 26550 articles
Browse latest View live