CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Simulation of fluid flowing across a heated pipe

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Pappelau
  • 1 Post By Pappelau

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2021, 13:00
Default Simulation of fluid flowing across a heated pipe
  #1
New Member
 
Cesare
Join Date: Dec 2021
Posts: 3
Rep Power: 5
Fueuhfi is on a distinguished road
Hello Foamers,
I'm new to the world of OpenFOAM and since I'm not at all sure about what I'm doing I'd like to have a few pieces of advice about a simulation I'm currently running. I'm trying to analyze water flowing in a spiral shaped, heated pipe. The data in my possession are:
- the flow rate at the inlet;
- the temperature at the inlet;
- the heat flux across the walls, in terms of power;
I'm running a 8.5 mln cells mesh which does not have any problem according to both my pre-processor and checkMesh. I'm using buoyantSimpleFoam as a solver to reach a steady state solution.
I've tried multiple combinations of BCs I've found searching on this forum, but still when I'm running the simulation, the calculation for p_rgh shoots to 1000 iterations and the convergence is not at all good for this parameter.
As far as I understood if I provide a condition for the velocity at the inlet, then I should provide a zeroGradient condition for p_rgh at the same boundary, and the same happens for the outlet patch, if I set the velocity condition at the inlet to zeroGradient I should provide an outlet condition for p_rgh. Still, if I do this, the calculation gives enormous continuity errors. Then I tried to adjust the continuity by also imposing a flow rate at the outlet. That solved the continuity problem, but I don't know if I did the right thing there at all. I'm thinking that I should initialize my fields better, but I don't have a clue about how to do it with such a complex geometry.
As for the turbulence properties, the Re inside the pipe is around 20000, I'm using a low y+ (around 5) approach for my mesh and a KwSST model.
In summary, I'm trying to use flowRateInletVelocity for U and since I'm sure that I'm making a big mess for not having understood or thought about something crucial, I'd like to know what are the right conditions to set for the outlet velocity and for the pressure boundaries if I don't know the pressure drop across my pipe. I will attach part of my bcs here for completeness, thanks to everyone willing to help
Attached Files
File Type: zip Case.zip (5.0 KB, 22 views)
Fueuhfi is offline   Reply With Quote

Old   December 15, 2021, 08:34
Default
  #2
Member
 
Lukas
Join Date: Sep 2021
Posts: 36
Rep Power: 5
Pappelau is on a distinguished road
Hello,


your pressure boundarys are not correct.
U need to have at least one fixed pressure at inlet or outlet.

normally u fix the pressure at the outlet i.e. type fixedValue
on p_rgh u normaly also use fixedFluxPressure instead of zeroGradient.


fixedFluxPressure -> when u have a defined velocity on this boundary(walls, inlet, etc)
outlet does not have a defined velocity typical so no fixedFluxPressure



hope that helps
Fueuhfi likes this.
Pappelau is offline   Reply With Quote

Old   December 15, 2021, 10:28
Default
  #3
New Member
 
Cesare
Join Date: Dec 2021
Posts: 3
Rep Power: 5
Fueuhfi is on a distinguished road
Quote:
Originally Posted by Pappelau View Post
Hello,


your pressure boundarys are not correct.
U need to have at least one fixed pressure at inlet or outlet.

normally u fix the pressure at the outlet i.e. type fixedValue
on p_rgh u normaly also use fixedFluxPressure instead of zeroGradient.


fixedFluxPressure -> when u have a defined velocity on this boundary(walls, inlet, etc)
outlet does not have a defined velocity typical so no fixedFluxPressure



hope that helps
Hello Lukas and thanks for the answer. Let me see if I understood it all correctly: in my case I've set fixedFluxPressure at the inlet, given that it has a velocity condition imposed by the flowRateInletVelocity BC that should be right. But then I did not understand if that does or does not count as the fixedValue you mentioned, so should I have in my p_rgh outlet BC a fixedValue condition instead of a zeroGradient one?
Fueuhfi is offline   Reply With Quote

Old   December 16, 2021, 01:45
Default
  #4
Member
 
Lukas
Join Date: Sep 2021
Posts: 36
Rep Power: 5
Pappelau is on a distinguished road
Yes u shall use fixedValue for the Outlet .


but the fixedFluxpressure is NOT fixing the pressure value, it "just" ensure the Flux is fixed to a value that is belonging to the velocity condition. Flux is the phi field value.

Today i also have watched your velocity (U) file : Please never use a massflow condition on inlet AND outlet this is very bad.

Best for convergence is always :
Massflow on inlet and FixedPressure at the outlet
only use something else if you don't have one of these informations


cheers
Fueuhfi likes this.

Last edited by Pappelau; December 16, 2021 at 03:11.
Pappelau is offline   Reply With Quote

Old   December 17, 2021, 05:48
Default
  #5
New Member
 
Cesare
Join Date: Dec 2021
Posts: 3
Rep Power: 5
Fueuhfi is on a distinguished road
Thank you very much for the informations! I have a much clearer view on the interactions between the various BCs the software provides now
Fueuhfi is offline   Reply With Quote

Old   February 11, 2022, 08:04
Default
  #6
New Member
 
Outside North America
Join Date: Nov 2021
Posts: 14
Rep Power: 5
Tian Hongkang is on a distinguished road
Hi, I've been using buoyantSimpleFoam on a flow and heat transfer problem in a tube and the turbulence model is KOmegaSST, but I get an error as soon as I run. Can you help me understand why that is? Thank you!
*****
Starting time loop

Time = 1

DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 0.0105904, No Iterations 1
DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 0.0062613, No Iterations 1
DILUPBiCGStab: Solving for Uz, Initial residual = 1, Final residual = 0.0125236, No Iterations 1
DILUPBiCGStab: Solving for h, Initial residual = 1, Final residual = 0.00863299, No Iterations 1
DICPCG: Solving for p_rgh, Initial residual = 0.974927, Final residual = 0.00959291, No Iterations 13
time step continuity errors : sum local = 135.963, global = 0.022484, cumulative = 0.022484
[0]
[0]
[0] --> FOAM FATAL ERROR:
[0] Attempt to cast type calculated to type nutWallFunction
[0]
[0] From function To& Foam::refCast(From&) [with To = const Foam::nutWallFunctionFvPatchScalarField; From = const Foam::fvPatchField<double>]
[0] in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/typeInfo.H at line 114.
[0]
FOAM parallel run aborting
[0]
[1]
[1]
[1] --> FOAM FATAL ERROR:
[1] Attempt to cast type calculated to type nutWallFunction
[1]
[1] From function To& Foam::refCast(From&) [with To = const Foam::nutWallFunctionFvPatchScalarField; From = const Foam::fvPatchField<double>]
[1] in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/typeInfo.H at line 114.
[1]
FOAM parallel run aborting
[1]
[2]
[2]
[2] --> FOAM FATAL ERROR:
[2] Attempt to cast type calculated to type nutWallFunction
[2]
[2] From function To& Foam::refCast(From&) [with To = const Foam::nutWallFunctionFvPatchScalarField; From = const Foam::fvPatchField<double>]
[2] in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/typeInfo.H at line 114.
[2]
FOAM parallel run aborting
[2]
[3]
[3]
[3] --> FOAM FATAL ERROR:
[3] Attempt to cast type calculated to type nutWallFunction
******


I guess there's something wrong with the nut file setup, but I don't know what's wrong?




******
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
INLET
{
type nutLowReWallFunction;
value uniform 0;
}
OUTLET
{
type nutLowReWallFunction;
value uniform 0;
//type calculated;
//value uniform 0;
}

WALL
{
type nutkWallFunction;
value uniform 0;
}
}
*******
Tian Hongkang is offline   Reply With Quote

Reply

Tags
buoyantsimplefoam, flowrateinletvelocity, pipe flow, thermal


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mixing Problem in Double Pipe Heat Exchanger With Fluid Fluid Interface Shomaz ul Haq CFX 3 December 17, 2015 13:50
Varying fluid temp inside pipe harsh_999 Fluent UDF and Scheme Programming 0 October 22, 2013 12:45
Double Walled Pipe Boundary dahvqaz FLUENT 2 December 5, 2012 11:14
simulation of fluid in pipe hamid1 FLUENT 1 June 3, 2011 20:00
My Revised "Time Vs Energy" Article For Review Abhi Main CFD Forum 2 July 9, 2002 10:08


All times are GMT -4. The time now is 04:12.