|
[Sponsors] |
July 2, 2014, 09:43 |
Implementation of CEL Expressions
|
#1 |
New Member
rainer arenskrieger
Join Date: Jun 2014
Posts: 12
Rep Power: 12 |
Hi,
I am currently running a simulation on the fluid flow in porous media. The main purpose of the simulation is the FSI of the fluid with a deforming wall and vice versa. To make a porous media deformable I have to use the Fluid Domain and use the Source Terms. I am doing a multiphase simulation. So I can only add Bulk Sources to a subdomain. In the first step: a assign a Permability under the momentum source/loss model/permeability tab this gives me a solution. In a second step I want to implement anisotropic permeability. This should be possible by assigning the Momentum Souces to Darcys law. The permeability loss model equals to S = - viscosity*Ux/Permeability 2. try: In CEL syntax this is: Sx = - viscosity * u /Permeability Sy = - viscosity * v /Permeability Sy = - viscosity * w /Permeability These Expressions are put into Bulk Sources/ Momentum Source/ General Momentum Source tab. Viscosity and u,v,w are variables and Permeability is an Constant defined in an other CEL expression. this gives error while running the simulation although it should give the exactly same results as 1. 3.try as I am not sure how to deal with the viscosity, I tried to calculate the viscosity on every element by myself. I did this by using the Volume Fraction of each element and the calculating an average viscosity: Sx = - (Fluid 1.viscosity+(Air.viscosity - Fluid 1.viscosity)*Air.vf) * u /Permeability Sy=... Sz=... I also get errors when trying this. 4.try The Momentum Sources are only relevant to the fluid, as the viscosity of Air is very small. So in the TAB Fluid Souces/Fluid 1 ... I carried out the same steps mentioned in the 1st to 3rd try. Again I get errors. This time also when assinging a constant permeability. Does someone know what my mistake is. I guess the velocites might cause a problem. If I these Problems are solved there are more of them coming up. I do not only want to simulate anisotropic permeability but also variable permeability: What I tried so far is: Instead of assigning a constant permeability to the Sources/Bulk Sources/ Momentum Source/Permeability Tab is assigned a variable permeability of the following kind: Permeability = f(Total Mesh Displacement Z) So as the mesh moves I want the permeability to change. The values of this function are reasonable but still I get errors when running the simulation. I am now wondering whether Total Mesh Displacement Z is a Field variable which has a values for each element? Way to many questions... Can someone give me a hint on how to solve some of my problems? Thank you in advance. |
|
July 2, 2014, 19:14 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
I am no expert on porous flow so will not comment on those questions.
Is Total Mesh Displacement a field variable? Yes. You can see what variables are available and where they exist in the CFX reference manual. |
|
July 7, 2014, 06:08 |
|
#3 |
New Member
rainer arenskrieger
Join Date: Jun 2014
Posts: 12
Rep Power: 12 |
When running the simulation with a variable Permeability= f(Total Mesh Displacement) I get the following Error:
| ERROR #001100279 has occurred in subroutine ErrAction. | | Message: | | Failed to calculate sources in GETSOU for LOSS_F1 from directory | | "LOSSM/RESIST" on location "Porous". Error return code is: BADL According to the manual this means: Variable can not be calculated atthe current LOCALE. As my experience using Expressions is still limited I wonder whether it is possible to use an expression of the Form Permeability= a*(Total Mesh Displacement Z)^b I would like this Expression to calculate the Permeability at every element as a function of Total Mesh Displacement Z. So as a result the Permeability should be constant at every point that is not deformed during the simulation where as the the Permeability is recalculated at every timestep for deformed elements. Is this somehow possible? Or do I have to try using User Functions and Subroutines? Thank you for your advice |
|
July 7, 2014, 06:57 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
You should be able to implement the CEL expression you describe, but you will need to properly account for units. Any value raised to a real power needs to be unitless, and a will need to have appropriate units to make it permeability.
But your expression will make the permeability zero at any location not moving. That does not seem to agree with your description of what you are trying to do. |
|
July 7, 2014, 07:58 |
|
#5 |
New Member
rainer arenskrieger
Join Date: Jun 2014
Posts: 12
Rep Power: 12 |
I did pay attention to units.
the Expression I really use is different to the one I gave in my last post. It is Permeability = A*B^(c*Fibre Volume Fraction) while Fibre Volume Fraction = D/(initial cavity height + Total Mesh Displacement Z) But I think I figured out my fault: When running the FSI simulation the variable Total Mesh Displacement is only assigned to the Interface, so a limited number of elements and not all of them. But in my expression I use Total Mesh Displacement as a Variable in the whole fluid Domain. Is there a variable in the fluid domain that gives me a ratio of the initial Mesh-Element Volume / Current-Mesh-Element Volume ? So the change in Element Volume due to the Mesh Deformation? If the is something similar to this I could a current Fibre Volume Fraction which would lead to Permeability. Thank you for still answering my questions. |
|
Tags |
cel, fsi, momentum sources, permeability, total mesh displacement |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
post processing for CEL expressions | Niru | CFX | 0 | May 10, 2013 14:13 |
Grouping expressions in CEL | foo7 | CFX | 4 | September 21, 2011 10:15 |
Time Step and CEL expressions for Mesh Deformation | rbarrett | CFX | 3 | July 6, 2011 11:13 |
Cel expressions | RAMAN6089 | CFX | 13 | December 1, 2009 00:17 |
Cel expressions for trasient problem | Jervds | CFX | 0 | March 4, 2008 11:03 |