CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Setting up boundary condition using CEL expressions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2019, 04:33
Default Setting up boundary condition using CEL expressions
  #1
Member
 
HS
Join Date: Sep 2015
Posts: 30
Rep Power: 11
amsys is on a distinguished road
Hello All,

I want to run a pulsatile simulation of flow through a pipe like structure. I need to set up a condition where flow/wall shear stress oscillates from -60 to +60 degrees deviating from its average, that is in the axial direction, following a sinusoidal function in time. I know that I will need to use expressions and set the expression at the inlet.

My question is how do I create this expression?

Any suggestions would be greatly appreciated!
amsys is offline   Reply With Quote

Old   May 17, 2019, 05:33
Default
  #2
Senior Member
 
urosgrivc
Join Date: Dec 2015
Location: Slovenija
Posts: 365
Rep Power: 12
urosgrivc is on a distinguished road
For transient simulations, you can use (t) in your expressions.
(t) will stand for time
So you are able to use it like this... fluctuating_expression = something1 * sin(t) + something2
this will make the value of your expression to fluctuate over time.
(something1 is probably 60 for your case, and something2 might be 0, you can also use "cos" of course)
(something2 will shift the sin function up or down)
(if you want diferent frequency of fluctuation you can also multiply time so... sin(t*something3) will work for speeding up or slowing down the sin function)

It is best to then check what your expression will be doing by plotting a graph from time 0 to some time, which can be done when writing that expression (check the tabs).

You are also able to use other variables like (x) for example, so sin(x) will fluctuate some variable according to the x direction.

I hope this helps
urosgrivc is offline   Reply With Quote

Old   May 17, 2019, 08:19
Default
  #3
Member
 
HS
Join Date: Sep 2015
Posts: 30
Rep Power: 11
amsys is on a distinguished road
Hello!


Yes that is extremely helpful, thank you!


So my expression is:

60*sin(t/0.16[s])+sin(x/1[m]).



The attached plot is what I obtain



I am not clear on one thing - I want sin(x) to fluctuate some variable according to the x direction. As my flow/wall shear stress has to oscillate from -60 to +60 degrees deviating from it's mean that is in the AXIAL direction. Would the "+sin(x/1[m])" do so?
Apology for the rather basic questions I am not a mathematician by background!


Thanks again.





Quote:
Originally Posted by urosgrivc View Post
For transient simulations, you can use (t) in your expressions.
(t) will stand for time
So you are able to use it like this... fluctuating_expression = something1 * sin(t) + something2
this will make the value of your expression to fluctuate over time.
(something1 is probably 60 for your case, and something2 might be 0, you can also use "cos" of course)
(something2 will shift the sin function up or down)
(if you want diferent frequency of fluctuation you can also multiply time so... sin(t*something3) will work for speeding up or slowing down the sin function)

It is best to then check what your expression will be doing by plotting a graph from time 0 to some time, which can be done when writing that expression (check the tabs).

You are also able to use other variables like (x) for example, so sin(x) will fluctuate some variable according to the x direction.

I hope this helps
amsys is offline   Reply With Quote

Old   May 17, 2019, 08:39
Default
  #4
Senior Member
 
urosgrivc
Join Date: Dec 2015
Location: Slovenija
Posts: 365
Rep Power: 12
urosgrivc is on a distinguished road
Yes, this looks nice I can see you have quickly got the point.
Congrats on figuring out the units, by the way, I have left that one out
but I don't understand your boundary condition to the point I could help any further, I will reread it a couple of times maybe something will come to mind.
The thread is actually written quite nicely but I just don't get it yet.
urosgrivc is offline   Reply With Quote

Old   May 18, 2019, 08:19
Default
  #5
Member
 
HS
Join Date: Sep 2015
Posts: 30
Rep Power: 11
amsys is on a distinguished road
Great thanks!
I was asking if the "+sin(x)" part of my expression would mean that the flow oscillates from -60 to +60 degree in the axial direction, if that clarifies it anymore!


Quote:
Originally Posted by urosgrivc View Post
Yes, this looks nice I can see you have quickly got the point.
Congrats on figuring out the units, by the way, I have left that one out
but I don't understand your boundary condition to the point I could help any further, I will reread it a couple of times maybe something will come to mind.
The thread is actually written quite nicely but I just don't get it yet.
amsys is offline   Reply With Quote

Reply

Tags
boundary condition, cel expression, inlet bc


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field xiexing CFX 3 March 29, 2017 11:00
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 09:44
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 05:39
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
CFX fails to calculate a diffuser pipe flow shenying0710 CFX 7 March 26, 2013 05:13


All times are GMT -4. The time now is 18:03.