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

Using 'if' statement with two conditions

$
0
0
Hi,

I want to use and if statement in COMSOL but I need it to have two conditions.

I want to calculate the value of the x coordinate when y = 0 and T=300.
Something like:
if(y ==0 and T == 300, xi == x)

Would the AND logical operator (&&) work instead of the and in my above statement?
No matter what I try I get errors.

Someone mentioned in a previous post that my if statement must not contain discontinuities and that they can be avoided by combining the if and sens operators, I don't understand how to do this though.

I would really appreciate some help with this problem!

Thanks,
-Adam.

Boundary electromagnetic heat source and convective cooling

$
0
0
Hi,
I am modelling amicroelectrode array with joule heating module. The structure consists of a glass substrate block, an electrode array (spiral or parallel) on top of the substrate, and a fluid medium which covers the electrodes and top surface of the substrate. Thus, there are 3 domains.

When the model does not include any convective cooling through the top surface of the covering medium, the solution converges and produces expected field and temperature patterns. Of course, I get very high heating (up to 100degC).

When I introduce convective cooling node, a number of errors occur:

" failed to find consistent initial values" - when the new node was added

"Out of memory" - when I refined the mesh

And, returning to "normal" mesh again, a new error:

"Repeated error test failures. May have reached a singularity.
Time : 0.004479106337024356
Undefined value found.
NaN or Inf found when solving linear system using SOR
Last time step is not converged."

With the convective cooling, only one boundary is chosen: the top boundary of the medium. This is then automatically de-selected from the Thermal insulation boundaries, which are automatically set to be all other boundaries of the system.

I suspect I have an inconsistency between Boundary Electromagnetic Heat Source, Thermal Insulation and Convective Cooling boundaries.
However, I seem unable to deselect the boundaries from the current automatic selection for the EM Heat source or Thermal Insulation.
How can I do that? Or, what would be the best way to troubleshoot this? Any tipes or advice will be greatly appreciated.
Many thanks.

Trouble coupling heat transfer physics for both fluids and solids

$
0
0
Hey all,

So I'm getting stuck with my model where I try to couple three different physics. The three physics are: Electric Currents, Heat transfer in Solids, and Heat transfer in Fluids. Basically what I'm trying to model is a silicon microbridge which is doped, which makes it so that it has a temperature gradient accross it when heated. I am able to couple and run the electric currents and heat transfer in solids physics, where the power dissipated from the ec physics is inputed into the ht physics as the heat source, and then the temperature that is calculated is used to calculate a new resistivity value for the silicon, until the model converges to a value for the temperature at the given voltage.

The problem arises when I try to incorporate the ht2 physics to mimic the effects of natural convection from the sorrounding gases. I set a temperature boundary condition within the ht2 physics which tells the program that the temperature of the microbridge is given by T, which is calculated in the ht physics. However, when I run this, I get the following error:

"Constraing found for variables in different Segregated groups. Try to merge these groups.
-Feature: Stationary Solver 1 (sol1/s1)
-Error: Constraint found for variables in different Segragated groups. Try to merge these groups."

Any ideas? Attached you will find my model. Thanks.

Split complex variable in real and imaginary parts and iterative solver configuration

$
0
0
Hi,

i'm tring to simulate an indutcor that produce some joule heating on a thin slab. This slab is a non linear material and has a HB curve. I work with 30kHz and i'm using a frequency solver with an iterative solver (GMRES). In order to increase the stability of the solver i activate the "split complex variable in real and imaginary parts" in the compile equation submenu. when i run my simulation i get the following error:

Undefined value found.
- Detail: NaN or Inf found when solving linear system using SOR.

I'm using a multigrid preconditioner.

Can someone help me.

Cheers
Nicola

2D interpolation of material properties as function of Temperature and Pressure?

$
0
0
Hi, I see that COMSOL 4.2a allows 2D interpolations, how would that be used to interpolate fluid properties, such as density, conductivity, cp, etc, as functions of temperature and pressure of the system? I have created tables of values from NIST at various temperatures and pressures but am not sure how to import that all into COMSOL and call it for the various pressure and temperatures.

Creating randomly placed beads/particles in COMSOL?

$
0
0
Hi,
I am trying to model a uFluidic capacitor system for electrical impedance spectrometry. It would be ideal if I could create a variable (> 1000) particles with certain properties (permittivity , conductivity) and place them randomly on the electrodes. They could be of spherical form.

I can think of making a sphere, with required properties, and placing on electrodes. However this method will only work for few particles and this approach cannot be used for huge number of particles. Eventually my beads in this experiment will be replaced by cells & we would like to count them based on changes in this impedance.

Any suggestions to model the beads in solution with random locations will be helpful. I would also be interested in seeing the dielectrophoretic force driving these particles in the solution, but this can all be added, I suppose once the beads are modeled.

Thanks in Advance,
Santosh.

about AC signal calculations in Comsol

$
0
0
Hi all,

I am curious about AC signals in Comsol.

Why do we need to add an analytic function from the functions subtitle to work with an AC signal?
I added a waveform of square wave. If I do not place it in analytic function, the program couldn't calculate the jakobian, thus doesn't work.

Simply, why adding a waveform only does not work?

thanks a lot.


--
physics undergrad
loves photon.

Problem when importing CAD file into COMSOL

$
0
0
Hello

Using COMSOL, I have imported a geometry (step file “.stp”) into COMSOL and converted it into COMSOL object.

Afterwards, the following error message keeps popping up: “Unsupported degree on Bezier representation”

Another error message that keeps popping up is: “Error in Geometry Decomposition”

What does each error message mean and how to solve these two errors ?

Thanks
Nayef

limitations of number of data in table or result.

$
0
0
Hi,

I am using the transient solver in RF modual, and recording the time-varying electric field.

For example, I have the following setteings:

Comsol is set to record the electric field at a given point every 1fs starting from 0 to 20,000fs.
Then, after simulation, I would suppose to have 20,000 data points.

However, it seems that there is a limitation on the maximun number of stored data numbers, only the latest 10,000 data are recored, and all the values before that are erased. Under this situation, when I plot electric field E versus time t, I only get 10,000 points instead of 20,000.

Can anyone help me to figure this out, since I need a long data sequence to do further data analyzing. I really appreciate for your help. Thanks.

Electric Field norm evaluations

$
0
0
Greetings,

Is there a way to get the value of the electric field norm by putting in exact coordinates and getting an evaluation? I am trying to get the E-Field norm value right above the surface of my geometry. I have tried the point evaluation but that gives me the value on the surface. I have specific coordinates I would like to do the evaluation at. any suggestions?

How to find Current and electric field ??

$
0
0
Hello sir,

I am student. and learning this Comsol 4.2 software..so i need a help..

My problem statement is like,

one meter length semiconductor wire (Ge) and radius is 0.3mm. if i am applying 25V DC across the wire..
is it possible that comsol solve that how much current is flowing and electric field is there in the wire..

if it is possible than please some one who know guide me .. How to make this problem in Comsol..

Please reply as soon as possible..

Thank you so much for reading my problem..

Thermal stress option seems to be missing

$
0
0
I'm looking to model stress and deformation in parts with differing thermal expansion coefficients as a result of a temperature change. Thermal stress is supposed to be available in the solid mechanics section of the program based on the Comsol website, but I can't find it. I have access to Comsol's thermal and solid mechanics functions, but thermal stress is nowhere to be seen. I'm running version 4.2a.

Tension Force

$
0
0
The material I am investigating has much lower tension limit than compression. So I want to use COMSOL to simulate the tension in the material, excluding the interference from compression. In the Structural Mechanics module, I only have Solid Mechanics interface. I wonder how to present the tension profile?

Thank you very much! I am using COMSOL 4.3

Convergence problems in time dependent simulations

$
0
0
Hello,

does anyone has experience how to solve convergence problem
in time dependent simulations ? I tried to produce square wave
input waveform from a sine wave input and using two diodes to
cut the waveform. This should be a straightforward but not necessary
the best method to produce square wave. The message I got "nonlinear
solver did not converge, ..., last timestep is not converged". Any specific
solver parameter sets which could help ? A better way to generate square
or PWM waveform ?

error of tolerances

$
0
0
Hi,

I am working on an AC model. The frequency of my signal is 1.3e10 Hz.
I am specifying the time interval as (0, 0.1*T, 5*T)
and I get an error:

"Failed to find time step so that given tolerances are satisfied.
Time : 0
Last time step is not converged."

What might be the problem?

thanks

--
physics undergrad
loves photon.

export image file in java from COMSOL and also plotting while solving

$
0
0
I am running a bunch of 1 hour time dependent COMSOL models in a big 'for' loop. I can get Eclipse to export a .txt file for each iteration of the 'for' loop and I can show a progress bar and a 2D/3D image at the end inside a the GUI (this is the GUI in the back of the API guide) Comsol provides for eclipse. I am having 2 problems though:

1) I can not get COMSOL to export an image file. The line of code:

model.result().export("plot1").run();

works for exporting .txt, but using:

model.result().export("img1").run();

does NOT work for exporting an image file. nothing appears.

I added the code:

BufferedImage bi = new BufferedImage(pWidth,pHeight, BufferedImage.TYPE_INT_RGB);
Graphics g = bi.createGraphics();
frame.paint(g);
g.dispose();
try{ImageIO.write(bi,"png",new File("C:\\Users\\Alex\\Desktop\\surf_"+i+".png"));}catch (Exception e) {}

and I can get a screenshot of the JFrame of the GUI at the end of each time simulation but not the 2D plot that shoud appear (see attached file).

Anyone have hints how to make the export feature work for COMSOL and an image or how to take a screenshot with the 2D image in the JFrame?

2)
In that same GUI, what code and where do I need to add it to have the GUI display the solution as it happens?

model.sol("sol1").feature("t1").feature("fc1").set("plot", "on"); does not work, and:
model.sol("sol1").feature().create("t1","PlotWhileSolving") gives me the error:

com.comsol.util.exceptions.FlException: Operation cannot be created in this context

Thanks for any help

PML with structural mechanics

$
0
0
I am trying to use a PML with my model. The model uses solids and shells in the structural mechanics. The PML is around a solid block on five sides. However when I attempt to solve I get the error Duplicate variable names for a large list of shell variables (see attached). Can anyone tell me what I am doing wrong. Thanks.

Questions about Load Case

$
0
0
Hi,

I am new to Solid Mechanics interface. I have a question about the load case.

What does load case mean? Also what are lgGravity, lgForce, cgGravity, and cgForce?

I am reading this:"Use Load Group and Constraint Group to collect conditions that will be enabled in different studies. Define a group in Global Definitions and assign its content directly from the load or constraint itself. Define load cases in the Study Extensions of a Study Type and enable active load and constraint groups; see Figure 4, where lg denotes a load group and cg denotes a constraint group. Weight is used as a multiplication factor for the corresponding load group." But I still don't quite understand. What's the use of it?

Could anyone explain it to me? Thank you very much!

Cantilever beam fracture

$
0
0
Hi Everybody

I have a question regarding analysis of deflection of the cantilever beam.
As it is clear, If I apply a small force on tip of the cantilever it will deflect. However in simulation I don't know how I can evaluate if the deflection (or applied force) is small enough to avoid fracture (breaking) of the beam. [beam dimensions are as follow: Length 500 to 100 um , width 30 to 50 um, thickness 0.7 um] and the force is in range of 100 pN
Can anybody give me some idea?


-I went through some mechanical books and they said the maximum stress that a material can tolerate before fracture is equal to yield stress (or fracture strength), but i don't know in my simulation I should compare which parameter with yield stress.

Weak boundary condtitions in magnetic field calculations

$
0
0
Hey,

I have an easy but large model, which can be made smaller by identifying a unit cell. In this unit cell I want to implement periodic boundary conditions for the magnetic field (B) . The only periodic boundary conditions i can find are the ones for the magnetic potential (Vm). Does any one now how to implement this condition (B_boundary1 = B_boundary2)?

Thank you in advance,

Sam
Viewing all 26323 articles
Browse latest View live