4 Replies Latest reply on Sep 24, 2013 12:50 PM by Jared Conway

# How would I enter an equation with absolut value call out in dependency formula

I am trying to enter the following equation:

760+0.5*(SIN(B2*2*(1/2.7)*PI)+ABS(SIN(B2*2*(1/2.7)*PI)))

As the formula definition in the dependency type of a boundary condition.

However it states that this is the wrong number format.

I suspect it is due to the ABS call out (or absolute value calculation)

Does anyone know flow simulation can calculate the absolute value?

The purpose to the equation is to create a half sine wave or in simpler terms turn on and off the flow of CO2 in my case.

thoughts?

• ###### Re: How would I enter an equation with absolut value call out in dependency formula

I don't think that abs is supported but I'll have to check the documentation.

Let's say it isn't. I'm not following what you are trying to do. What is b2? What are you controlling and what is the control mechanism you are going for?

• ###### Re: How would I enter an equation with absolut value call out in dependency formula

I am sorry if I am wrong, but I do suspect, you just forgot to put an "=" sign before your equation. Hope that is the only problem. besides I assume that you had defined the constant "B2" as well (in below equation i took B2=50). Besides m not using Flow Simulation, and dont even know how to put equations in it, I hope, if in above window it works then it should work for Flow Simulation too. As it belongs to same Software (SolidWorks)

• ###### Re: How would I enter an equation with absolut value call out in dependency formula

Okay slight correction.

B2 = time or t

So we get 760+0.5*(SIN(t*2*(1/2.7)*PI)+ABS(SIN(t*2*(1/2.7)*PI)))

What this gives (at least in excel) is a half sine wave.

I was hoping to turn my injection of CO2 on and off using this without having to insert a massive F(time)- table.

Sandip,

So far I have found when entering formulas into solidworks flow simulation (formula fefinition you don't use an = at the begining.

• ###### Re: How would I enter an equation with absolut value call out in dependency formula

andy, i just checked the formula definition, abs isn't in there, you really can only use what is on the formula defintiion "calculator". ie, it doesnt' support all the functions from excel like abs. if you removed it and it worked, that is probably the issue. you could check with your VAR.

the workaround in this case would be to use a table.