comsol logical expressions

FOB Price :

Min.Order Quantity :

Supply Ability :

Port :

comsol logical expressions

1 Reply, Please login with a confirmed email address before reporting spam. Thanks for the quick reply. Hi Jing, glad you found it useful. Your_value = (y==0)*(T==300)*(My_New_Value - Some_other_value) + Some_other_value COMSOL Multiphysics provides smoothing functions that you can use to make, for example, smooth step functions that are continuous. http://www.comsol.com/support/knowledgebase/905/ Complement Selection creates selections that are the inverse of . Plotting the expression at (20,p)-at (10,p) overrides the Solution at time setting and shows you the pressure increase between 10 and 20 seconds. For a given temperature, it is either bend upward or not at all. You can also use max(f(t), 0). The at operator lets you access the solution at any time in postprocessing. I was working on a similar problem and had similar issues. -- I am trying to use an if statement to get the value I want but keep getting a value of 0 for xi: d(sqrt(0.5*(tresca_smld^2+mises_smld^2)),t) is the time-derivative of your stress. Then use the sections below to specify the geometric entities to split, the expression, and the split condition. Thank you for your answer. In this way you ensure that the jacobian of your system can be evaluated without too much noise, hence the solver wil step through your discontinuity without failure hi, i wonder could i set a condition that means "the time when temperature reaches to a certain level"? Note that while COMSOL employees may participate in the discussion forum, COMSOL software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team. listed if standards is not an option). f(t) = a+b*cos(2*pi*t/8760)+c*cos(2*pi*t/24) Jeff. By providing your email address, you consent to receive emails from COMSOL AB and its affiliates about the COMSOL Blog, and agree that COMSOL may process your information according to its Privacy Policy. 1 Reply Last Post Apr 23, 2015, 2:43 a.m. EDT. To my opinion above expression should be intop1(u*(x2>x>x1)*(y1Built-In Operators. - Variable: mod1.p How do I solve a PDE with space derivatives of order higher than two? [QUOTE] Each solution comes from one step function. For instance, suppose that you need to assign 5 to a variable on a rectangular surface with the dimensions Jesus. x > 0.1 && x < 0.3 && y > 0.1 && y < 0.3. In my case, I'm trying to type a cosine function to simulate solar radiation throghout a year, with daily and annual variation. I didn't tested it, but it seems that it would work. / 48.28333N 11.56667E / 48.28333; 11.56667. The with operator lets you postprocess more than one parametric or eigensolution in a similar fashion. I have a similar problem. Operators, including the up and down operators, are documented in the COMSOL Multiphysics Reference Manual. huseyin. I really like the new COMSOL capability to join two separate solutions into one dataset using the Join functionality. And if I want a whole expression to be above 0, for example? -- Posted Feb 1, 2010, 12:54 p.m. EST say, integrating an field-expression within bounds of (x1,,y1) and (x,y) in a 2d model (x16), which evaluates to 0 for simulation times up to 6 seconds and to 5 after 6 seconds. if ( (x, [QUOTE] Your internet explorer is in compatibility mode and may not be displaying the website correctly. listed if standards is not an option). Discontinuous functions like the step function above might cause numerical difficulties. Hi Randhir, This is done from Definitions > Model Couplings. Posted Aug 17, 2009, 2:35 p.m. EDT Thanks for any help. hi, i wonder could i set a condition that means "the time when temperature reaches to a certain level"? I hope I have made my problem clear! I didn't tested it, but it seems that it would work. I found the solution and I'm going to share it with you. After I would created another one with a conditional statement: As most skilled COMSOL users, I am sure you know that you are not limited to just selecting what is in our drop-down lists. How can a funtion be applied in a boundary expression? you need to separate each condition and multiply them, i.e. Please: How to calculate this in Comsol 5.4:-8*Al*Al*integralof(dT/dz(r,0))*r*dr) from(0 to 1/2/Al). Note that the default plot for complex fields shows the real part. I believe a Join data set should do the trick. Good luck How to Create High-Quality Model Images in COMSOL Multiphysics, Developing a Silicon MEMS Chip for On-Demand DNA Synthesis, Predictive Analytics Capabilities of SmartUQ for COMSOL. I get an error message when trying to open my glTF-file in an external viewer, Using the Previous Solution Operator in Transient Modeling. 1[a] They live on boundaries and help you evaluate anything with discontinuities. I think I've found a solution to my problem, although I'm not using it anymore in my simulation. Ivar, Hi, Unterschleiheim ( Central Bavarian: Untaschleiheim) is a town in Bavaria, Germany. Youve mentioned how the d operator differentiates a variable wrt to time and space but how do we differentiate a variable wrt another dependent variable. Discussion Closed This discussion was created more than 6 months ago and has been closed. For questions related to your modeling, please contact our Support team. For instance, suppose that you need to assign 5 to a variable on a rectangular surface with the dimensions ii) you have some numerical or strange model issues going on, ad one coul expect that to happen also if you sart with just one step Your internet explorer is in compatibility mode and may not be displaying the website correctly. i = -(h>100) Ivar, <1) works well for many cases meaning V=V0 for X<= 1 and V=V0+V1 above>>, Regarding the above statement, I don't see how this syntax communicates that V=V0 for X 100, then i = -1, if not i = 0, Hi enter it in as a function and plot it, that is the easiest way I know to check equations in COMSOL I understand what you are saying. There are some descriptions about the if operator in the User's Guide. -- of 2 [mm] * 3 [mm], but not along the two edges at x=2 and y=3. I would create an analytic equation with the expression: Something like: if (y ==0 and T == 300, xi == x) Would the AND logical operator (&&) work instead of the and in my above statement? If not, please contact support@comsol.com with your model, and we should be able to give you some more specific advice. You probably didnt think of it, but in the expression I just mentioned, sqrt, ^, and even + are all examples of operators. Best, Am I right? Hello my freinds, Can anyone give an advice on how to implement a conditional statement with two arguments? Good luck T= 293 for t. If I use following function in the boundary expression: If I use following function in the boundary expression: if ( (x, [QUOTE] Hi Alexandre, -Adam, Hi Ivar, Hi Ivar, Many thanks to the author for this useful information! To start a new discussion with a link back to this one, click here. Please, could you tell me how to access (for instance with the WITH() operator, or by means of the JOIN node for data) to any value of two different parameterized solutions (say in one solution the parameter goes from 0 to 1 and in the other the parameters goes form 1 to 2)? perhaps if you use more (), or try a boolean Note that while COMSOL employees may participate in the discussion forum, COMSOL software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team. A logical expression is a statement that evaluates to either "true" or "false." Relational operators are a type of logical operator, and compare two values such as 5 > 4 (true) or 3 4 (false). You can use the at operator to compare two solutions at different times during results evaluation; for example, at (30,u)-at (20,u) is the difference between the solution at 30 s and the solution at 20 s. The first input argument is the time. 7 Replies, Please login with a confirmed email address before reporting spam. To start a new discussion with a link back to this one, click here. Good luck Version 5.2a listed if standards is not an option). -- To start a new discussion with a link back to this one, click here. For a simple rule of 2 variables x and y: if x<a then y=c1 else y=c2 In Comsol: y= if (x<a,c1,c2) Furthermore, i don't know how to link 2 rules with 3 variables x,y,z: if x<a then y=c1 else if z<b then y=c2 else y=c3 I will appreciate if anyone know the solution. I took the minimum temperature of a domain and i want to imply that the time when the minimum temperature in a system reaches 50 degC ? Yes you can. if(f(t)>0, f(t), 0) Magnus Ringh, COMSOL. Setting reference pressure does not affect my results at all, Operators not allowed in user-defined functions, Including Operators and Expressions in a Multiphysics Simulation Is Easier Than You Think. Unterschleiheim. matlab has several types of relational operators; some of the most common are listed below: Online Support Center: https://www.comsol.com/support The purpose is to use the final time-step Temperature T1 of comp1 as the initial value T0 of comp2. Ivar. Parameters, Variables, & Functions Duplicate variable name. It does not work. The expression to evaluate then becomes intop1(u*(x>x1)*(xy1)*(y1) works well for many cases meaning V=V0 for X1) to turn on the force F after 1 second is a "hard" way to go for your solver, try the heaviside functions to smoothen the turn on/off (search for heaviside in the doc Version 5.0 Best Regards, Thanks in advance. S. Use the imag operator to show its imaginary part, abs to plot the norm, or arg to see the phase angle. Magnus Ringh, COMSOL. However I wish to assign the variable xi to the value of x when T=300 and y=0. I can easily plot the function f=(x, Hi I had an expression as "max(p,-capillarypressure*(phils, Susant, Error in multiphysics compilation. To start a new discussion with a link back to this one, click here. Solving time dependent models with inconsistent initial values, Solutions as Starting Point Values with LiveLink for MATLAB. - Variable: mod1.p You can see the Guide for details. 1 Reply, Please login with a confirmed email address before reporting spam. For plotting an coloured area for example: 0.1 < x < 0.3 and 0.1 < y < 0.3 the correct logical expression is as follwed: I want to calculate the value of the x coordinate when y = 0 and T=300. To add to Jeff's reply, COMSOL Multiphysics includes units for hour, day, and year, so you can use, for example, To add to Jeff's reply, COMSOL Multiphysics includes units for hour, day, and year, so you can use, for example, Your internet explorer is in compatibility mode and may not be displaying the website correctly. Plotting the expression at(20,p)-at(10,p) overrides the Solution at time setting and shows you the pressure increase between 10 and 20 seconds. You can find the complete list of mathematical and other operators in the COMSOL Multiphysics Quick Start and Quick Reference. Alwaysmverify and validate your work,in steps it's easier ;) For plots that take vector inputs you must use the defined variables directly in the edit fields for the vector components. COMSOL offers a whole range of useful ones, not all equally obvious. Simply type, for example, 5* (t>6), which evaluates to 0 for simulation times up to 6 seconds and to 5 after 6 seconds. This is just the tip of the iceberg. Posted: 7 years ago. Geometric Entity Selection Ivar. You want it to be equal to the quadratic mean of the Tresca and von Mises stresses. If you work with electromagnetics, you might have plotted the magnetic field in an eigenmode analysis only to find that it appears to be identically zero. But I want that the function to be true only to values above 0. if ((x, Hi Jeff, Suppose you have an integration operator intop1 and an expression u that you want to integrate over the rectangle x10) or simply, ((f(t))>0) In the COMSOL Multiphysics software, using Boolean and adjacent selections, you can create customized groups of geometric entities that update automatically when you change your model geometry. The with operator lets you postprocess more than one parametric or eigensolution in a similar fashion. i.e. I have a similar problem in Darcy flow simulation where I want to change the field variable p only when a another field variable phils is below a certain value, the first error is: I have a similar problem in Darcy flow simulation where I want to change the field variable p only when a another field variable phils is below a certain value, the first error is: Discussion Closed This discussion was created more than 6 months ago and has been closed. Is that a bug or it this meant to be? It must be there, but where?? Your internet explorer is in compatibility mode and may not be displaying the website correctly. The numbers 24 and 8760 in your expression suggest to me that perhaps you think t is in hours (8760 is the number of hours in a year, 24 the number of hours in a day), when it's in seconds, the SI unit for time. Say that you have invented your own measure of structural stress. So that if both T=300 and y=0 are true (then equal to one) then whatever the x coordinate at the point is gets assigned to xi. Hi Hi, I'm trying to find an explanation of simple operators like up() and down() in the helpfor Comsol 5.0. As usual, the Combination Method gives you various options for how to combine the solutions. i have a boolean logic expression, if t >= 0, t < 0.2 F = 1./ (1+exp (-140* (t-0.08))) if t >= 0.2 and t< 1 F = 1./ (1+exp (60.61* (t-0.35))) when i use below boolean expression in the variable, it end up that the the two statement is added up and the maximum y magnitude jump to 2, while when i use matlab, it is 1. This works. (x==0)*(T==300)*YourValue It is located about 17 km north of the city limits of Munich, and has a resident population of 29,464 (December 31, 2021). Isn't it more correct? Thanks, Hello Jesus, Best regards, Can anyone give an advice on how to implement a conditional statement with two arguments? Cite 15th Feb, 2018. Best regards, -- This is useful to add a conditional statement in expressions within the software. Good luck then what about: if(f(t)>0, f(t), 0) Ivar, Are there any way to make a 2D function? Your internet explorer is in compatibility mode and may not be displaying the website correctly. COMSOL Multiphysics provides the solution at that time using interpolation. Best, Results-Derived Values-Surface Integration, set Expression equal to 1 to get the full area, and Expression equal to (u>1.5) to find the area where u is larger than 1.5. I need to couple two components comp1 and comp2 in logiciel Comsol. Adam Collins Send Private Message Flag post as spam Hi, I want to use and if statement in COMSOL but I need it to have two conditions. there are two places whree aou can test out formulas:

Jamaica To Haiti Flight Time, Teacher Leadership Skills Framework, Martin's Point In-network Providers, Pocketmine Bedrock Plugins, Internal Audit Manager, Club Pilates Foothill Ranch,

TOP