Latest Discussions - COMSOL Forums Most recent forum discussions Fri, 14 Jun 2024 19:26:38 +0000 COMSOL Forum: Latest Discussions Magnet - Magnetic and Electric Fields <p>The below post is related to an <a href="//">archived discussion</a></p> <hr /> <p>Hello,</p> <p>I am trying to create a stationary magnet within the Magnetic and Electric Fields setting. I have tried using Ampere's Law and Current Conservation for each pole of the magnet, but keep getting a singular matrix error.</p> <p>I have seen lots of examples of how to create magnets in the (MF) setting, but I can't figure out how to create it in (MEF).</p> <p>Any recommendations would be greatly appreciated!</p> <p>Thanks, Tesla</p> Fri, 14 Jun 2024 19:26:38 +0000 4.2024-06-14 19:26:38.341102 Manually defining the Periodic Boundary Condition in COMSOL <p>In COMSOL while applying the Periodic Boundary Condition(PBC) it is necessary to select edge or boundary for solid continuos surfaces, but my case model domine is dicreate elements so i am looking for manually applying the PBC on descreat points. Is is possible to apply? if then please give the idea</p> Fri, 14 Jun 2024 18:42:26 +0000 4.2024-06-14 18:42:26.341091 Simulating magnetic field of an RF Coplanar Waveguide <p>Hello,</p> <p>I hope all is well. I was wondering if someone could help me with simulating the magnetic field due to exciting a coplaner waveguide in the RF module. I added magnetic fields Physics module and a stationary solver step, but I cannot get a plot of the magnetic field</p> Fri, 14 Jun 2024 16:12:48 +0000 4.2024-06-14 16:12:48.341082 Issues when solving linear system in Frequency Domain study step when removing symmetry BCs <p>Hi,</p> <p>I have a COMSOL Multiphysics model in which I simulate an optical cavity with a high Q-factor mode around 194 THz. My goal is to first solve for the eigenmodes of the optical cavity using the 'Eigenvalues' study step. From this, I obtain the extact eigenfrequency of my desired mode. In a next step I would like to excite this mode using a 'Frequency Domain' study step. To do this I place a magnetic dipole in the cavity to excite this mode.</p> <p>I first performed this sequence of steps on a model which uses a PEC (XZ plane) and PMC (YZ plane) to exploit the symmetry of my mode. Everything works well and in my simulation with the 'Frequency Domain' study step, I can see that I have excited the correct mode.</p> <p>When I move the PMC boundary condition to investigate a design that is not symmetric in the x-direction, I can solve the 'Eigen Frequency' problem. However, when I now plug the eigenfrequency of my mode in the 'Frequency Domain' step, the simulation gives the following error:</p> <p><em>The following feature has encountered a problem: - Feature: Stationary Solver 1 (sol1/s1) *Undefined value found. - Detail: NaN or Inf found when solving linear system using BiCGStab.</em> *</p> <p>I have tried the same for a model without any symmetry boundary conditions and got the same error. I have verified that the correct BC apply when I remove the PMC. Strange enough I get this error after the following lines in the output file:</p> <p><em>Iter SolEst Damping Stepsize #Res #Jac #Sol LinIt LinErr LinRes ------- Current Progress: 71 % - Solving linear system Memory: 47703/48062 59739/60208 1 - 1.0000000 - 1 1 1 1 1.2e+51 1 ---------- Current Progress: 100 % - Solving linear system Memory: 5231/49874 9221/61944 Solution time: 262 s. (4 minutes, 22 seconds) Physical memory: 49.87 GB Virtual memory: 61.94 GB Ended at Jun 13, 2024, 10:07:23 AM.</em></p> <p>Which seems to suggest that my model did actually work and solved the Frequency Domain study step. Can anyone help me understanding what is going wrong here?</p> Fri, 14 Jun 2024 08:00:49 +0000 4.2024-06-14 08:00:49.341061 Effect of temperature on simulation of piezoelectric sensor. <p>Hello Everyone I am simulating a piezoelectric sensor. I want to see the effect of temperature on sensor specification like resonance frequency, displacement and their sensitivity. Can anyone help me to configure a model which can simulate the structure with temperature?</p> Fri, 14 Jun 2024 06:19:05 +0000 4.2024-06-14 06:19:05.341051 Two-Phase Flow to model the water entry in a tube <p>Hi, I am Martha. I am working on a project to analyze the water flow path through two materials. I want to model the air in a tube and see if the suction is enough to pull the water from the soil. Does anyone have an idea of how I could model it? At this moment, I am thinking about using the two-phase flow.</p> <p>Thank you!</p> Thu, 13 Jun 2024 23:58:17 +0000 4.2024-06-13 23:58:17.341042 Electromagnetic Waves simulation including also Electrical Circuit and Magnetic Fields physics <p>Hi, my first effort simulating electromagnetic fields generated by an electric circuit. In this case a simple bandbass filter. I utilize three physics: Electromagnetic Waves, Electrical Circuit and Magnetic Fields. First I would like to do a frequency domain study. All went quite fine if all components (except the pcb and wiring) were lumped parts and included in Electromagnetic Waves physics. Changing the coil to a geometrical model and using also Magnetics Fields physics made it more difficult to solve. And what for I cannot define the components in the Electromagnetic Waves if I included Electrical Circuit physics (the capacitors in the circuit). My ultimate goal would be an electromagnetic simulation (both frequency and time) for a more complicated circuit including a power converter (a switch, a transformer, capacitors and pcb with wiring). The transformer and wires would be geometrical models and the rest could would be lumped parts. This first simple model I managed to solve in one frequency point (about 0.5-1 hours simulation time) but the simulation failed at the second point. 1) Is there errors in the model? 2) Maybe a different solver or changes in the solver configuration?</p> Thu, 13 Jun 2024 22:31:29 +0000 4.2024-06-13 22:31:29.341041 Problems with coil core <p>Dear All,</p> <p>I'm stuck on a very simple problem, but it prevents me from analyzing my model. When adding a core to my coil, the inductance should be greater, but it simply doesn't change. Can anybody help me? In the attached model I have a square coils with the input and output, interfacing the air boundaries. Simply enabling the material core I can set the presence of a core.</p> <p>Thanks comsol 6.2</p> Thu, 13 Jun 2024 22:28:54 +0000 4.2024-06-13 22:28:54.341032 K values stays constant and spring structure gets deformed on force application in COMSOL <p>Hello Experts,</p> <p>I recieved an error in my 3D model in comsol for a force sensor . We use the concept F = Kx(Hooke law)</p> <p>On point of application of the force as shown in K values error screenshot, the spring gets deformed when I run the l6 parameter defined value from (5,1,7) mm range. I attached the screenshots of the error.</p> <p>1) displacement_z direction screenshot : denotes the displacement of the spring in z direction. 2) k variable formula screenshot: shows the formula to evaluate the k value . 3) k values error screenshot: shows the k value as constant even when we vary the parameter range from 5 mm to 7 mm range since the springs gets deformed as can be seen in the diagram. The point of application of force F is shown in the diagram.</p> <p>Can you please suggest the cause behind this error and how can i fix it?</p> <p>P.S: The .mph file is 30MB therefore it is not possible to upload in the post as we have upload file limit of 5MB</p> <p>Kind regards Amit</p> Thu, 13 Jun 2024 14:09:00 +0000 4.2024-06-13 14:09:00.340961 Eigenvalue/Eigenvalue boundary conditions <p>Dear forum,</p> <p>I have a stationary study of the flow around a cylinder performed in comsol using a nondimensional framework. Now I want to find the leading eigenvalues using this study and I have a couple of questions: 1) How to define the shift value if the eigenvalue is a complex number? Is it correct to say RealPartValue+i*ImaginaryPartValue? 2) I dont find a way to set the boundary conditions of the eigenvalue problem, are they somehow already implemented? So far I tried several options but everytime I get Lambda=0 as results.</p> <p>Additional question: I have tried to implement the weak formulation of an eigenvalue problem using the Weak Form PDE but again I don't see the boundary condition options. Also, Is it possible to use the data from a SPF study such as velocities and pressure and implement the weak fomulation of an eigenvalue problem?</p> <p>Reagrds, Robert</p> Thu, 13 Jun 2024 10:37:23 +0000 4.2024-06-13 10:37:23.340951 use of several selections in mphinterp <p>Hi,</p> <p>I am using mphinterp with selection.</p> <p>The "help" indicates that it can be a list of selected elements</p> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <p>> selection Positive Integer array | Selection list String | {'all'} &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <p>However, when I test an array of selected elements, I get an error message : "only a single boundary is allowed"</p> <p>Which is it ? Can I export values from a plane made of several surface elements ?</p> <p>Best regards, Alexandra.</p> Thu, 13 Jun 2024 08:48:46 +0000 4.2024-06-13 08:48:46.340941 How to export all plots and all plot data for every experiment in a Parametric Sweep? <p>I am running a parametric study on a 3D model. I have a cut plane dataset that I am using to generate a 2D surface plot. I want to export every 2D surface plot as an image, and also export a .csv of the dataset. I want to do this for each parameter in the parametric study, with the parameter values automatically placed in the filename. Can this be done in Comsol?</p> <p>I can do this manually, by manually writing out the filename and then exporting each 2D surface plot as an image and then a .csv dataset for every single different parameter in the sweep, but I will be doing a large sweep, and it is not feasible to sit and do that for every single experiment in the sweep.</p> <p>I have tried exporting the plot data in a CSV format all at once, but I get the error "Data can only be exported if the same mesh is used for all parameters" (see attached image)</p> Wed, 12 Jun 2024 22:23:55 +0000 4.2024-06-12 22:23:55.340912 Thermal Runaway Modeling negative temperature <p>Hello everyone,</p> <p>I am building a model to investigate the thermal runaway propagation behavior in a battery module. I am currently facing a problem where I keep getting negative temperatures between the cells that are next to propagate. The propagation also happens way too fast (within a minute for 11 cells) so I am wondering if those negative temperatures might be the reason. It might be important to add that the negative temperatures keep appearing in the battery holders which are placed at the bottom part of the batteries. When I delete them, the negative temperatures disappear.</p> <p>Do you have any idea why this might be happening? Any advice is welcome, thank you!</p> Wed, 12 Jun 2024 21:01:12 +0000 4.2024-06-12 21:01:12.340911 Microfluidic Chamber Injection <p>I am trying to model the injection of a small amount of buffer containing a known concentration of a dilute species into a larger known volume of the same buffer in a chamber with none of the chemical species. Ive tried modeling it as a source of high concentraiton in a larger area of 0 concentration, but the diffusion coefficient is so low that it does not accurate represent my real world model, as there should be velocity and turbulence caused by the injection, which would propel the dispersion. I also need the itme dependent simulation to allow for the injection between time = 0 and time = T1; For all time after T1, there should be no inflow into the system, as the injection stops. There is also no outlet to the system, the chamber modeled should not be full of water to begin with so there is space for injection.</p> Wed, 12 Jun 2024 18:20:07 +0000 4.2024-06-12 18:20:07.340902 Cosimulation for Simulink <p>hello,</p> <p>The file of simulation is Tubular Permanent Magnet Generator that i have downloaded on the comsol website. I have a problem with the cosimulation Comsol for Simulink. After i have indicated filename, input and output, comsol require to define "study", but there is only the voice "none". I also have started the simulation, but the study 1 not compare in "cosimulation for simulink".</p> <p>Can someone help me?</p> Wed, 12 Jun 2024 16:17:41 +0000 4.2024-06-12 16:17:41.340901 Solid Mechanics - Failed to find a solution. <p>Hi,</p> <p>I am trying to simulate how a catheter deforms, when pushing against a vein. It's a fairly complex catheter (as it is imported from CAD) but a "easy" vein ostium.</p> <p>I set the boundary load at the end of the shaft with 0.2N and the Fixed contraint on the outside of the vein ostium.</p> <p>The outter cylinder as well as the cylinder and the cone around the catheter are not used in the solid mechanics module but for another stage later.</p> <p>I already tried to use Symmetry as the catheter is symmetrical for 1/5 of the circle (see 2.png).</p> <p>Is there a better way to get this result? Could it be a problem, that the catheter and the ostium aren't in contact yet?</p> Wed, 12 Jun 2024 10:49:09 +0000 4.2024-06-12 10:49:09.340891 plane stress vs generalized plane strain vs plane strain <p>When solving 2D plane stress problem, the results are different in generalized plane strain (GPS) and plane strain (PS) both cases with external strain node applied. Which seems quite obvious because two conditions have different geverning equations. But I would like to know what exactly the plane strain does with the external strain node applied (under each linear elastic material node). Also I would like to know why the GPS results are not consistent with the 3D midplane results.</p> <p>As an example, let us look at a simple solenoid case comparing the 3D midplane results with 2D plane_PS(PS+external strain) and 2D plane_GPS(GPS+external strain). All three models have the same loading condition which results from Lorentz force by applying 200 A/mm^2 in phi-direction. For 2D models, the force in z-direction is zero so this effect was accounted for by giving the resultant strain in z-direction (-0.0001464) obtained from the 3D model.</p> <p>Thre results comparison for three models are shown in the figures in the image link-> 3D model and 2D_PS model shows consistent results with only difference in z-direction strain. It seems that the 2D_PS model solves the problem ignoring the external stress at first then recalculate the stress in z-direction with the given external strain. But then external strain value is not reflected in the final result (just displays 0 just as default value for typical PS condition). While 2D_GPS shows about 10% of difference in strain as well as in displacement, the stress in x and y-direction are consistent with other models. But then the strain and stress in z-direction shows entirely different results! This is where my mind is blowing.</p> <p>My guess for this situation for now is that there should be an additional contraint to the 2D_GPS model (maybe some kind of weak constraint). This may do some trick in reformulating the problem so that the resultant strain match the given external strain. So I searched about this and found a blog from 2017 about GPS problem: <a href=""></a>. But this has a Singular matrix problem and cannot be solved by any means.</p> <p>Does anybody have a clue on why this kind of deviation occurs in 2D_GPS model and a way to resolve?</p> Wed, 12 Jun 2024 04:54:36 +0000 4.2024-06-12 04:54:36.340871 TE and TM incident radiation. <p>Hello. I wanted to ask about that how to plot the absorptivity as a fuction of frequency at different angles of incidences for TE and TM incident radiation. As I'm simulating a metasurface I have used transition boundary condition on the top mettalic layer, impedance boundary condition on the bottom mettalic layer and a perfect magnetic condutor. Then in the port I have used the type of port as user defined with the electric field which has a magnitude of unity in y-direction and mode phase as zero. Propagation constant is a plane wave (emw.k). I'm trying to design the 1/4th part of the metasurface. So, I want to know how to apply incident angles in TM and TE modes.</p> <p>Thank You!</p> Wed, 12 Jun 2024 03:55:51 +0000 4.2024-06-12 03:55:51.340861 Averaging in frequency domain vs averaging in time dependent study <p>Hello all,</p> <p>I am a novice in COMSOL and CFD in general. I have a pretty basic question regarding how frequency domain studies can be translated to time dependent studies. I am trying to simulate a 2D electric field between two electrodes with a dielectric in between. One of the electrodes is supplied with an alternating sinusoidal voltage, while the other electrode is set as the ground. In the time-dependant study, when I evaluate a surface average of normE in the dielectric, I get an average value for each time step. In comparision, when I evaluate the same in a frequency domain study, I am only getting a single average value for the particular frequency of the voltage waveform, regardless of the phase I set. My question is, is the average obtained from the frequency domain study equivalent to a time-averaged surface average normE in the time-dependent study over several periods?</p> <p>Thank you</p> Tue, 11 Jun 2024 20:29:38 +0000 4.2024-06-11 20:29:38.340852 Thermal Analysis of a Two Phase Fluid Flow System <p>Hello, I am quite new to COMSOL Multiphysics, currently modelling a multiphase flow using level set. I want to integrate Heat Transfer between the 2 fluids, however, when I apply the temperature boundary condition to the initial interface between the fluids, after some time the position of the interface of fluids changes but the temperature remains at the initial interface. How to I couple Level Set and Heat Tranfer in Fluids such that the boundary of temperature boundary condition changes with the changing fluid interface.</p> Tue, 11 Jun 2024 06:19:29 +0000 4.2024-06-11 06:19:29.340781