|
[Sponsors] |
November 22, 2017, 12:11 |
Dependent Boundary Condition
|
#1 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
Dead Foamers,
i want to create an inlet boundary condition for a scalar value. The inlet rate should depent on the scalar concentration in the cells connected to my inlet patch. So that if cell value = 0, the inlet value will be 1.0 and vice versa. Any anything in between. Therefore i would like to know if there is any way to determine the cell value during runtime? Regards, Robert |
|
November 28, 2017, 11:23 |
|
#2 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
So, after a bit of digging i came with the idea of using the codedFixedValue BC.
Code:
code #{ // look up patch fields directly: const scalarField& cPatchField = this->patch().lookupPatchField<volScalarField, scalar>("psi"); // Calculate the average field const surfaceScalarField cAvg = cPatchField.average(patch().boundaryMesh().mesh().V()); operator == (1.0-cAvg); //this->value() = 1.0-cAvg; #}; So, the question is: How do i calculate the average, or in the best case the weighted average, of my scalar boundary field? Regards, Robert |
|
Tags |
boundary condition, dependent variable, scalar value |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Time dependent boundary condition for VOF function | houkensjtu | OpenFOAM | 1 | January 25, 2013 14:34 |
External Radiation Boundary Condition for Grid Interface | CFD XUE | FLUENT | 0 | July 9, 2010 03:53 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 07:49 |