
[Sponsors] 
July 2, 2014, 02:08 
How to add impedance outlet BC

#1 
New Member
丁笑天
Join Date: Jun 2014
Posts: 1
Rep Power: 0 
Hi everyone!
I am a fresh foamer and my recent work really needs help; The question is how to implement an impedance/resistance outlet Boundary condition. This boundary condition can be described by a simple equation: P=F*R; where P is the outlet pressure, F the volume flux at the outlet, R is the resistance. (Taken from the electronic circuit equation U=I*R); If I get the outflow volume flux of a specific outlet, I can calculate the outletpressure and then apply it to this outlet. The main problem is that I don't know how to modify the original fixedvalue pressureoutlet as desired, can anybody help? Last edited by xiaotian.ding@gmail.com; July 6, 2014 at 21:19. 

September 24, 2016, 09:38 

#2 
Member
Rudolf Hellmuth
Join Date: Sep 2012
Location: Galway, Ireland
Posts: 38
Rep Power: 6 
I have the same problem, I am trying to make a resistive outlet BC (p_out = R*Q), that simulates the effect of the tube downstream from the BC. The problem, I suppose, arises from the fact that the pressure BC is softly coupled with the velocity BC, and this generates instabilities, if the inflow conditions (U or p) have a sharp time variation (time derivative). When that happens, the pressure on the outlet BC can become too high, because the velocity field is calculated with the outlet pressure of the previous time step (before pressure correction), resulting in a artificially high outlet flow rate. Then, pressure is updated with p_out = R*Q, to an extremely high value, which causes spurious oscillations of p and U at the outlet. It would be extremely important to either couple U and p (which I suppose is difficult), or penalise oscillations of the velocity field at the outlet (which I don't know how to do).
I am using the plenumPressureFvPatchScalarField as guide to implement the resistiveBC, but it is an oneway explicit coupling, which should also have this backflow instability, because it has a regularisation scheme. Update of p in the plenumBC: Code:
void Foam::plenumPressureFvPatchScalarField::updateCoeffs() { ... const scalarField p_new ( (1.0  pos(phi))*t*plenumPressure + pos(phi)*max(p, plenumPressure) ); // Relaxation fraction const scalar oneByFraction = timeScale_/dt; const scalar fraction = oneByFraction < 1.0 ? 1.0 : 1.0/oneByFraction; // Set the new value operator==((1.0  fraction)*p_old + fraction*p_new); fixedValueFvPatchScalarField::updateCoeffs(); } U_outlet = U_outlet  b*(1  pos(phip))*U_outlet , where 0 < b < 0.5. Does anyone know what I should do to update the velocity field with a backflow penalisation after the pressure field is solved? Any suggestion is very appreciated. Another question: Can I update the UEqn matrix from my pressure BC code in order to couple the pressure update with velocity? Thanks, Rudolf 

Tags 
cell data, openfoam udf, userdefined bc 
Thread Tools  
Display Modes  

