Latest Discussions - COMSOL Forums https://www.comsol.com/forum/ Most recent forum discussions Tue, 31 Jan 2023 13:26:52 +0000 COMSOL Forum: Latest Discussions https://www.comsol.com/shared/images/logos/comsol_logo.gif https://www.comsol.com/forum/ Impedance spectroscopy of two electrodes in medium with frequency-dependent conductivity and permittivity https://www.comsol.com/forum/thread/319161/Impedance-spectroscopy-of-two-electrodes-in-medium-with-frequency-dependent-conductivity-and-permittivity?last=2023-01-31T13:26:52Z <p>Hello,</p> <p>I have created parameters and tried (in the material water,liquid) to replace the preset electrical conductivity and electrical permittivity with formulas to make them frequency dependent (because i want to simulate NaCl solution). This does not seem to have worked well, is there any other way in the program to account for the frequency dependence of the medium?</p> <p>I am currently using the electric currents setting but it is not giving me the results I want. I had hoped that the electroanalysis would give better results but I can't find a way to display the impedance between the two electrodes. I cannot use "Electrode surface" because my electrodes are in the medium. What settings do I need to make to get an impedance spectroscopy?</p> Tue, 31 Jan 2023 13:26:52 +0000 4.2023-01-31 13:26:52.319161 simulating the Multi-Mode Interference device (MMI) https://www.comsol.com/forum/thread/319151/simulating-the-Multi-Mode-Interference-device-MMI?last=2023-01-31T12:07:18Z <p>Dear All</p> <p>I am simulating the power splitter based on Multi-Mode Interference with Grating (MMI), I have followed the existing geometry of the MMI device as shown in the attached photo, please find it.</p> <p>I have added the Wave Optic module to calculate the Electric field within the MMI stucture and the model has been solved without error. However, the result I got does not the same as the result published in the attached photo.</p> <p>Please note: I am attaching my model to this email. I have cleared the mesh to reduce the file size.</p> <p>What do you advise me to make the Electric field look like exactly the published paper, please?</p> <p>Best regards, Manal</p> Tue, 31 Jan 2023 12:07:18 +0000 4.2023-01-31 12:07:18.319151 using the Optimization Module https://www.comsol.com/forum/thread/319141/using-the-Optimization-Module?last=2023-01-31T11:24:57Z <p>Hi everyone</p> <p>I am interested in using the optimization module. I have read its user manual and found the following points:</p> <ul> <li><p>You can use the control variables directly to parameterize any aspect of the physics that is controlled by an expression. This applies to material properties, boundary conditions, loads, and sources. However, control variables cannot be used directly in the geometry description. Instead, the model must be set up using a Deformed Geometry or Moving Mesh interface to control the shape of the geometry. Then use control variables to control the mesh movement, effectively parameterizing the geometry.</p></li> <li><p>The optimization module can be used for estimating modeling errors caused by uncertainties in material properties or for predicting the effect of a geometrical change.</p></li> </ul> <p>Does this mean that the optimization module can be used for optimization of actual material properties of the material itself (not only material parameters), please?</p> <p>Best regards, Manal</p> Tue, 31 Jan 2023 11:24:57 +0000 4.2023-01-31 11:24:57.319141 operations involving derived values https://www.comsol.com/forum/thread/319131/operations-involving-derived-values?last=2023-01-31T14:09:52Z <p>Hello, In the Results node, I would like to evaluate expressions and formulas involving derived values. For example, in a 2D problem, I need to divide a line averaged value (temperature, magnetic induction, it does not matter) obtained averaging on a select 1D element, by , for instance, a surface obtained by integration on a 2D (obviously) different element. I do not succeed to make simple operations (x,+,-,/) on derived values when they refer to different elements. Yes, I can do it later by hand but I would like Comsol to do these calculations for me, expecially in a parametric sweep. Thank you in advance.</p> Tue, 31 Jan 2023 11:10:41 +0000 4.2023-01-31 11:10:41.319131 Expression, Function and how it must work correctly? https://www.comsol.com/forum/thread/319121/Expression-Function-and-how-it-must-work-correctly?last=2023-02-01T09:12:52Z <p>Dear Colleauges now I in the process of transfer from Ansys to Comsol and i have 20 years expirience for numerical simulations because now Comsol is really friendly and powerfull instrument.</p> <p>I see the big possibilities for using Expression and Function for flexible define BC, matherial properties and etc, but with my huge expirience i have strange problem for my works with Espression in the Comsol. For example i want to define Piecewise function for radiative emisivity BC for walls, and i define hrad function with argument T is 0.1&#42;sigma_const&#42;(T^4 - 293^4) and interval for T. But Comsol not calculated the part of expression "-293^4" and results the same for "-293[K]^4" and etc, for example 0.1&#42;sigma_const*(T^4)- 0.1&#42;sigma_const&#42;(293^4). The plot graph for this function calculated only for T argement and absolutely ignored all other. Where i can see the principles (algorithm) for correct defining of expresions? Please help me. As well, becasue Expression field absolutely don't has contects help (For example Ansys CFX preprocessor has a prefect help for all variables and etc in the field for formula), I'm as a user not understand what i may to do in the Expression field. The help of Comsol in laptop version is too small and i want to find the all list of operations, variables and etc (include from results solutions) which i can to use in the expression field. Please help me. Give me please the links to webinars,papers and other Comsol web helps, where i can see it clear.</p> <p>My big respect for Comsol team, Evgeny</p> Tue, 31 Jan 2023 10:32:26 +0000 4.2023-01-31 10:32:26.319121 Setting initial conditions with mphinputmatrix https://www.comsol.com/forum/thread/319102/Setting-initial-conditions-with-mphinputmatrix?last=2023-01-30T18:03:13Z <p>Hi all,</p> <p>I am trying to run a transient while manipulating both the initial conditons and the system matrices using the mphinputmatrix command. Namely, I am trying to set the current solution as the initial condition for the next timestep, in addition to manipulating the stiffness matrix/ load vector. However, whenever I use mphinputmatrix (and LiveLink creates the associated InputMatrix subnode in the time dependent solver), it also automatically disables the dependent variables node. Does anyone know the reason for this? Whenever I try to forcibly enable the variables node again I get an 'active dependent variables found' error. Is there a way to set the initial conditions AND manipulate the system matrices? Is the variables node the only place the solver stores initial conditions or can you input them into the time dependent solver node directly? Any help would be much appreciated.</p> <p>John</p> Mon, 30 Jan 2023 18:02:46 +0000 4.2023-01-30 18:02:46.319102 How to set a geometry as a perfect conductor in the electrostatics package? https://www.comsol.com/forum/thread/319092/How-to-set-a-geometry-as-a-perfect-conductor-in-the-electrostatics-package?last=2023-01-31T14:27:00Z <p>Hi All,</p> <p>I am new to comsol and finite element simulations, so please be gentle. I am trying to model electrostatic fields at the surface of some field emitters that have cylindrical geometries. I need to model them as perfect conductors, but I do not see the option for perfect conductor in the electrostatics or electrostatics and boundary elements package, only in the RF module do I see it available. Any advice on how to set my field emitters as perfect conductors?</p> <p>Thank you, Connor</p> Mon, 30 Jan 2023 17:36:45 +0000 4.2023-01-30 17:36:45.319092 Curl operator https://www.comsol.com/forum/thread/319091/Curl-operator?last=2023-01-30T10:24:16Z <p>I need your assistance to perform the modelling of this issue:</p> <p>T x e = curl(W) or ∇ x W where W is the unknown vector to be determined T is the temperature profile and e=cos(alfa) i +sin(alfa) j. Thank you in advance</p> Mon, 30 Jan 2023 10:24:16 +0000 4.2023-01-30 10:24:16.319091 cut line coordinates change https://www.comsol.com/forum/thread/319081/cut-line-coordinates-change?last=2023-01-30T09:34:29Z <p>Hello, I am trying to simulate this geometry with comsol (laminar flow and transport of dilueted species ) I get the results of concentration, velocity and pressure ,but when I try to apply a cut line at the end of the geometry and 1D plot group and click on Plot ;the cut line coordinates change on its own ,like in this photo. I tried to simulate it with different versions(5.4 ,5.6 and 5.3a ) and I still have the same problem. Can anyone tell where is the probleme please</p> Mon, 30 Jan 2023 09:34:29 +0000 4.2023-01-30 09:34:29.319081 Seepage and stability analysis of canal with flowing water https://www.comsol.com/forum/thread/319071/Seepage-and-stability-analysis-of-canal-with-flowing-water?last=2023-01-30T05:44:20Z <p>I want to perform seepage and stability analysis of canal at different stages when water flows from upstream to downstream. Please provide me with relevant information or videos if any</p> Mon, 30 Jan 2023 05:44:20 +0000 4.2023-01-30 05:44:20.319071 How to work on the interface of COMSOL and YADE in UBUNTU? https://www.comsol.com/forum/thread/319062/How-to-work-on-the-interface-of-COMSOL-and-YADE-in-UBUNTU?last=2023-01-28T01:13:43Z <p>Hello I have a question, I want to work on ICY which is the interface between COMSOL and YADE. But when I want to run COMSOL from terminal, and I wrote "comsol mphserver" on teminal, I get this "comsol: command not found" how can I solve this? and when I want to work on python, in terminal I put "python server.py" but it gives me this error" Command 'python' not found, did you mean: command 'python3' from deb python3 command 'python' from deb python-is-python3" Then I put his command on terminal "python3 server.py" and then it gives me this error "File "/home/geology/Downloads/verification codes training/client-server/server.py", line 39 print 'command: '+command ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?". How can I solve these problems.</p> Sat, 28 Jan 2023 01:13:43 +0000 4.2023-01-28 01:13:43.319062 Volume integration - by steps https://www.comsol.com/forum/thread/319051/Volume-integration---by-steps?last=2023-01-27T17:48:23Z <p>Hello, Here is an issue I am facing. I am solving a problem with a cylinder (center at 0,0,0 and thickness t along z-axis), which absorbs electromagnetic energy (solved in frequency domain). The total absorbed power is a volume integral of emw.Qh, which is ok. But what I first want to see is a surface density of absorbed power, that is, integral of emw.Qh along z axis. I can write it as:</p> <p>integrate(comp1.at3(x,y,z,emw.Qh),z,0,t)</p> <p>It works in results, (although it takes some time for integration). Let's call this density as rho. Next, what I want to do is to integrate this density along all 2pi angles (lying withing xy plane). Doing it in the same results part seems to be a nightmare (I think because it evaluates the first integral each time it needs to calculate the second), so what I did is I introduced a state variable, defined in the disk xy-face as</p> <p>rho = integrate(comp1.at3(x,y,z,emw.Qh),z,0,t)</p> <p>Then it does this integration once and keep it stored. Then, in results node, I can write:</p> <p>integrate(comp1.at2(x<em>cos(th),x</em>sin(th),0,rho_ACS),th,0,2*pi)</p> <p>Finally, I would like to integrate the previous part from 0 to an arbitrary radius r (up to the maximum radius of the disk). How can it be done? The previous expression cannot be entered as another state variable. Also I haven't figured how to write an expression in results node. Any help or reference to models using integration is more then welcome.</p> <p>COMSOL v5.6</p> Fri, 27 Jan 2023 17:01:38 +0000 4.2023-01-27 17:01:38.319051 how Optimize Photonic Crystal fiber by genetic algorithm in MATLAB? https://www.comsol.com/forum/thread/319041/how-Optimize-Photonic-Crystal-fiber-by-genetic-algorithm-in-MATLAB?last=2023-01-27T14:34:20Z <p>I have an Photonic Crystal fiber structure and I want to optimize it with genetic algorithm in MATLAB. I have linked comsol and matlab, I need help with optimization with ga.?</p> Fri, 27 Jan 2023 14:34:20 +0000 4.2023-01-27 14:34:20.319041 How to use Enthalpy function for modelling solidification melts and correct represent solidification in the wide mushy zone for alloys ? https://www.comsol.com/forum/thread/319031/How-to-use-Enthalpy-function-for-modelling-solidification-melts-and-correct-represent-solidification-in-the-wide-mushy-zone-for-alloys-?last=2023-01-31T18:33:06Z <p>Dear Colleauges, Great thanks for you perfect work ! Comsol is really have all chances be better than Ansys today.</p> <p>I have a big expirience for modelling casting process in other softaware (like Ansys and Procast) and in this year I started usefull (tested) Comsol. COMSOL I think will be most universal package at nearest time but i have a some troubles for correct modelling alloys with wide solidification range, for example Al-Zn alloy with 7-9% of Zn where is solidification temperature range ~ 70 C. For this case not possible to use Hidden melting heat for jump during 1 degree of Celsius as for pure Aluminum and I need to define precise function for Enthalpy or Capacity for all temperatures for solidification range. Best way for that - use Enthalpy function directly, and which we can define by Function (Interpolation) from txt file obtain by Calcosoft Procast for alloy. But, I not uderstand possible or not to use Enthalpy formulation for heat mass transfer in COMSOL, or only Heat Capacity formulation is available? I tried to import enthalpy curve from txt file as Function(interpolation) with name “Enth” and after that make a new function which is a differentiation of Enth by temperature. In the field Expression of new analytic function I define the d(Enth,T) and argument T in the bottom field. But it does not working, Comsol not understand the name of function “Enth”. Is possible to use d(f,x) for differentiation the functions? Or I must to prepare txt file with Heat Capacity curve by another packages which will give me the differentiation of Enthalpy curve? As well I have additional question Is possible to define temperature interval (by function or another) in the field Phase Change interface – Phase change temperature and Latent Heat in neighbor field?</p> <p>I hope you very clearly understand that for alloys with wide solidification range should be correct representation for crystallization in the mixed (solid+liquid) mushy zone.</p> <p>May be would be better to use Multiphase model for Alloy. What is your reccomendation for type of multiphase model?</p> <p>Best regards and my respect to your titanic works ) Evgeny</p> Fri, 27 Jan 2023 12:17:57 +0000 4.2023-01-27 12:17:57.319031 Finding the derivative https://www.comsol.com/forum/thread/319011/Finding-the-derivative-?last=2023-01-30T02:23:32Z <p>write derivative of x at "t" w.r.t t= derivative of x at "t-1" +t^2 in comsol</p> Fri, 27 Jan 2023 06:43:21 +0000 4.2023-01-27 06:43:21.319011 Automate Run and Save in Comsol https://www.comsol.com/forum/thread/319001/Automate-Run-and-Save-in-Comsol?last=2023-01-27T06:37:52Z <p>The below post is related to an <a href="//cn.comsol.com//forum/thread/236892/using-model-save-method-to-save-as-mph">archived discussion</a></p> <hr /> <p>If you want to run and autosave, You can use method in application builder and write below code-</p> <p>model.study("std1").run();</p> <p>saveApplication();</p> Fri, 27 Jan 2023 06:36:44 +0000 4.2023-01-27 06:36:44.319001 2D Discrete Fracture Network Modeling https://www.comsol.com/forum/thread/318991/2D-Discrete-Fracture-Network-Modeling?last=2023-01-27T05:36:04Z <p>I want to perform DFN for 2D fracture networks can anyone help me out. How to proceed and share me possible available resources. There is a model on official page for 3D DFN (https://www.comsol.com/model/flow-in-a-fractured-reservoir-90421), but I'm looking for 2D DFN.</p> Fri, 27 Jan 2023 05:36:04 +0000 4.2023-01-27 05:36:04.318991 Scattered field formulation - what is it? (i.e., computationally) https://www.comsol.com/forum/thread/318951/Scattered-field-formulation---what-is-it-ie-computationally?last=2023-01-26T13:49:06Z <p>Hi, when I need to model scattering (or absorption) of a single particle under illumination with external wave (usually plane wave), then I use scattered field formulation - same as described in your tutorial: https://www.comsol.com/blogs/modeling-the-scattering-of-light-off-of-an-object-on-a-substrate/ For the case of a substrate I write my background field manually (with reflected and transmitted wave), and whole simulation domain is encapsulated in PML - to simulate individual particle. I am wondering, how COMSOL treats this background field. I mean, obviously it finds fields obeying Maxwell equations (simplified to Helmholtz equation), but it also needs bounday conditions (or starting point). With ports I can understand (to some extent) this boundary condition, but what is happening in scattered field? This is mainly to understand limits of applicability of this formulation (if any): for example, what if the particle will provide a huge change in fields compared to the background (i.e., it is not a small perturbation), will results still be physical? I use RF and Wave Optics modules (both do the same), v5.6.</p> Thu, 26 Jan 2023 13:49:06 +0000 4.2023-01-26 13:49:06.318951 Electric point dipole source in 2D electromagnetic simulation nx, ny but not nz direction option? https://www.comsol.com/forum/thread/318942/Electric-point-dipole-source-in-2D-electromagnetic-simulation-nx-ny-but-not-nz-direction-option?last=2023-01-26T11:20:38Z <p>The below post is related to an <a href="//cn.comsol.com//forum/thread/63761/electric-field-from-a-point-source">archived discussion</a></p> <hr /> <p>The direction of an electric dipole source in a 2D simulation appears to be restricted to the nx and ny directions in the "Dipole parameters" section. The nz direction resulting in Ez (perpendicular to plane of problem) is also of interest. Is nz direction or Ex field not available in 2D simulation due to the nature of the simulation implementation?</p> Thu, 26 Jan 2023 11:20:38 +0000 4.2023-01-26 11:20:38.318942 Solid Mechanics with Heat Transfer for Stress simulation https://www.comsol.com/forum/thread/318932/Solid-Mechanics-with-Heat-Transfer-for-Stress-simulation?last=2023-01-30T07:47:11Z <p>Hello</p> <p>There is a cavity with pressure applied. Along with the pressure, I added theremal expansion to see stress caused by theraml expansion as well as pressure. However, whenever I add the themal expansion, my study fails with the following err. Would anyone please help me with this?</p> <p>Feature: Stationary Solver 1 (sol1/s1) Failed to find a solution. Maximum number of Newton iterations reached. Returned solution is not converged. Not all parameter steps returned.</p> Wed, 25 Jan 2023 20:27:07 +0000 4.2023-01-25 20:27:07.318932