|
[Sponsors] |
[Expressions - swak4foam] troubles for custom boundary condition |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 7, 2022, 11:49 |
[Expressions - swak4foam] troubles for custom boundary condition
|
#1 |
Member
Eric Segalerba
Join Date: Dec 2021
Location: Italy
Posts: 31
Rep Power: 5 |
Hi everybody,
I'm trying to implement a time dependent boundary condition. I'm using Expressions that should be close to swak4foam but I can't really figure out how is the synthax. This is the boundary condition I wrote Code:
throat { type flowRateOutletVelocity; volumetricFlowRate uniform -2.67e-04; type exprFixedValue; variables ( "CPI = 0.01" "p_throat{throat} = weightAverage(p.t())" ); valueExpr #{ CPI / p_throat #}; value uniform (0 0 0); } 1. surely I wrote in the wrong way the type but I can't figure out how to code a boundary condition which computes the flowrate 2. how can I make the code read the patch pressure runtime? Is .t sufficient? Thank you in advance! |
|
June 14, 2022, 10:07 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
I haven't checked much (or anything) of what you are actually doing, but you should note that for a flowRateOutletVelocity boundary condition, the "massFlowRate" or "volumetricFlowRate" is already a Function1, which means that you can also specify an expression for that.
I don't see a good reason why you would instead want to re-implement things using an exprFixedValue - IMO It makes more sense to leverage the existing boundary condition. |
|
Tags |
expressions, openfoam v2106, programming, swak4foam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Centrifugal fan | j0hnny | CFX | 13 | October 1, 2019 14:55 |
Accessing multiple boundary patches from a custom boundary condition file | ripudaman | OpenFOAM Programming & Development | 0 | October 22, 2014 19:34 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
CFX fails to calculate a diffuser pipe flow | shenying0710 | CFX | 7 | March 26, 2013 05:13 |