|
[Sponsors] |
Setting a mass flow with periodic boundary conditions (3D) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 4, 2022, 08:33 |
Setting a mass flow with periodic boundary conditions (3D)
|
#1 |
New Member
Felix Asch
Join Date: Dec 2021
Posts: 2
Rep Power: 0 |
Dear Foamers,
I have a problem with setting a certain mass flow rate when using periodic boundary conditions in a 3D domain. I have already read various threads with similar topics, however I have not been able to find a suitable solution yet, as my problem is a bit more specific. Here some information about my problem: I am trying to simulate the polymer melt (non-Newtonian) in a twin screw extruder using OpenFOAM (V9 or V2112). I have a geometry conform computational mesh with the following patches: inlet, outlet, both screws (screw_l and screw_r) and the housing_wall, and the fluid domain see attached picture. For this I simulate a small section (half conveying element) and use periodic boundary conditions (cyclic) at the inlet and outlet. The goal is to simulate this steady-state, incompressible, isothermal and laminar with simpleFoam at a constant screw speed of 60 rpm in order to calculate the dimensionless ratios according to Pawlowski. For the velocity (0/U) boundary conditions, I use the cylindricalInletVelocity boundary condition on the screws to set the speed. For the adhesion condition, I use noSlip or fixedValue uniform (0 0 0) on the housing wall. Inlet and outlet are defined as cyclic. Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { INLET { type cyclic; } OUTLET { type cyclic; } SCREW_L { type cylindricalInletVelocity; value uniform (0 0 0); origin (0.0167 0 0.01); axis (0 0 1); axialVelocity constant 0; radialVelocity constant 0; rpm constant -60; } SCREW_R { type cylindricalInletVelocity; value uniform (0 0 0); origin (-0.0167 0 0.01); axis (0 0 1); axialVelocity constant 0; radialVelocity constant 0; rpm constant -60; } WALL { type fixedValue; value uniform (0 0 0); } } Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { INLET { type cyclic; } OUTLET { type cyclic; } SCREW_L { type zeroGradient; } SCREW_R { type zeroGradient; } WALL { type zeroGradient; } } The direction of flow is the z-axis. For a flow to occur, I want to specify a mass flow or a velocity component in the flow direction (v_z) over the cross-sectional area of my flow channel, so that a pressure gradient is formed and I get a pressure driven flow. Via fvOptions and (patch-)MeanVelocity (patch = outlet) with Ubar (0 0 v_z) a flow is formed and the solution converges. Code:
momentumSource { type patchMeanVelocityForce; active on; patchMeanVelocityForceCoeffs { selectionMode all; fields (U); patch OUTLET; Ubar (0 0 v_z); } } My problem now is that the velocity component v_z in the fvOptions (Ubar) cannot be set smaller than 0.2 m/s, otherwise the simulation stops with the follwoing error message: Code:
FOAM FATAL ERROR: Continuity error cannot be removed by adjusting the outflow. Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow. Total flux : 9.75213e-05 Specified mass inflow : 5.87128e-05 Specified mass outflow : 5.87129e-05 Adjustable mass outflow : 0 From function bool Foam::adjustPhi(Foam::surfaceScalarField&, const volVectorField&, Foam::volScalarField&) in file cfdTools/general/adjustPhi/adjustPhi.C at line 107. FOAM exiting I also tried to run potentialFoam to initialise a flow but that did not work as planned. The problem now is, that i need flow velocities (v_z) smaller than 0.2 m/s in order to specify a certain mass flow rate from experimental values. Here I do not yet understand the direct connection between the size of the velocity component (v_z) in the fvOptions and the termination of the simulation. Is there perhaps an alternative to the function meanVelocity in the fvOptions, with which I can directly set a pressure gradient or a mass flow rate? I would be very grateful for any tips or hints. Have a nice day Felix |
|
April 5, 2022, 15:07 |
|
#2 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hi
Since you are using cyclic would it be possible to use the cyclic fan BC? https://www.openfoam.com/documentati...-jump-fan.html I've used ot for pumps/fans, if you have some experimental values you can input your own "Pump/fan" curve. Some of the other coupled BC's could be an option. https://www.openfoam.com/documentati...onditions.html Maybe the mappedFlowRate How to properly use mappedFlowRate
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
April 10, 2022, 13:46 |
|
#3 |
New Member
Felix Asch
Join Date: Dec 2021
Posts: 2
Rep Power: 0 |
Hi linneman, first of all big thanks for your tips.
I have spent the last few days trying different boundary conditions, hence the late reply. It seems that the mappedFlowRate BC is what I was looking for. I have now mapped the FlowRate of the Outlet to the Inlet. Meaning, what flows out of the outlet flows right back into the inlet, giving me periodicity of the geometry as well (i hope i understood that right?). The mass flows confirm this assumption (massflow_outlet at t=1 corresponds to massflow_inlet at t=2, and so on, see attached figure MassFlow_1) if the BC are chosen as follows for the Inlet and Outlet: 0/p: Code:
inlet_new { type zeroGradient; } OUTLET { type fixedValue; value uniform 0; } Code:
inlet_new { type mappedFlowRate; phi phi; rho rho; neigPhi phi; value uniform (0 0 0); // placeholder } OUTLET { type zeroGradient; } -Inlet as VelocityInlet and Outlet as PressureOutlet. This should be satisfied for the constraints shown above?! First, I would like to calculate a mass flow m0 for the condition: Pressure gradient = 0 (over my entire geometry) This should correspond to the pure drag conveying capacity of the twin screw extruder. The problem is that I have not yet found any suitable boundary conditions or settings, with which a simulation without pressure gradient (pressure gradient = 0) can be carried out. Is there an option for this such as in the fvOptions or can this also be done by setting the boundary condition correctly? With the BC shown above my results are smaller than the reference values by a factor of 10. After i got m0, I would like to specify 10-90%*m0 (for example, at the inlet at t=0), which creates a pressure gradient that in turn affects the mass flow m that forms. Surely this should be possible by specifying a starting value vz at my mappedFlowRate? Code:
inlet_new { type mappedFlowRate; phi phi; rho rho; neigPhi phi; value uniform (0 0 0.02); // placeholder } Any Ideas how i can fix this? Many thanks in advance Felix |
|
Tags |
fvoptions, mass flow rate, openfoam, periodic bc |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues on the simulation of high-speed compressible flow within turbomachinery | dowlee | OpenFOAM Running, Solving & CFD | 11 | August 6, 2021 07:40 |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 19:02 |
Question about adaptive timestepping | Guille1811 | CFX | 25 | November 12, 2017 18:38 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |
Low torque values on Screw Turbine | Shaun Waters | CFX | 34 | July 23, 2015 09:16 |