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

tutorial for rhoPorousSimpleFoam doesn't make sense

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 4, 2024, 13:40
Default tutorial for rhoPorousSimpleFoam doesn't make sense
  #1
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6
boffin5 is on a distinguished road
Hello,

In OpenFoam-8, when I go to tutorials/compressible/rhoPorousSimpleFoam, there are two cases: angledDuctExplicit and angledDuctImplicit.

In both of them, when I go to 0/U, it shows the internalField value as 'uniform (0 0 0)' and the inlet BC as:
Code:
inlet
    {
        type            flowRateInletVelocity;
        massFlowRate    constant 0.1;
        value           uniform (0 0 0);
    }
How can there be any flow when the inlet flow velocity is set to zero?

But when I run the case for either of them, the U field looks great with a definite non-zero value (see image).

What is going on here?
Attached Images
File Type: png SnapCrab_NoName_2024-6-4_9-25-42_No-00.png (32.5 KB, 4 views)
boffin5 is offline   Reply With Quote

Old   June 4, 2024, 14:14
Default follow-up; still doesn't make sense
  #2
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6
boffin5 is on a distinguished road
In this website it describes the two angledDuct cases.

https://www.tfd.chalmers.se/~hani/ku...ukurReport.pdf

It says that for the angledDuctImplict case the solver for the velocity does not need to be defined (I don't get it), while for the Explicit case it does, by putting this in system/fvSolution:
Code:
solver
 {
 U smoothSolver
 {
 smoother     GaussSeidel;
 nSweeps      2;
 tolerance     1e-06;
 relTol           0.1;
 };
 ...
So here, it specifies the solver for the velocity, but I still am left clueless as to how the velocity itself is specified. Please educate me.
boffin5 is offline   Reply With Quote

Old   June 5, 2024, 04:19
Default
  #3
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello Alan,

Code:
inlet
    {
        type            flowRateInletVelocity;
        massFlowRate    constant 0.1;
        value           uniform (0 0 0);
    }
The important parameter here is massFlowRate. Value is just a placeholder and it does not have any effect on the simulation.
Have a look here, this is the same reason: What is the difference between the parameters 'value' and 'p0' in totalPressure BC?

Yann
Yann is offline   Reply With Quote

Old   June 6, 2024, 15:23
Default Then how is the direction of flow determined?
  #4
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6
boffin5 is on a distinguished road
Yann, Thank you for your response!

If the flow velocity is to be set by the mass flow rate, then by using dimensional analysis, I concluded that it might be:

U = MFR/(rho*A) where MFR = mass flow rate, rho = air density, and A = inlet area of the domain

or MFR = U*rho*A

For my simulation, MFR =(59.16 msec-1)(1.293 kgm-3)(98 m2)
= 7496 kgsec-1

But I still don't see how this determines the direction of flow.

I tried putting this value for MFR into the U boundary condition, and also 1.0. Attached is an image showing the results in paraView:

For an MFR of 7496, I get psychedelic results for p and T, whereas U does nothing. But for an MFR of 1.0, the results are telling:
It shows a reduction of pressure in front of the radiator, which is the opposite of what one would expect. The temperature heats up on both sides of the radiator, but that should only happen on the exit side. Again, U does nothing.
Could this be because somehow OpenFoam does not know which way the flow is going?

At any rate, my BCs are obviously wrong. Attached is a text file showing the key ones, as well as a file showing my fvSchemes and fvSolution.

I kind of need some help, and at this point am despairing if I ever will get this simulation sorted out.
Attached Images
File Type: png fields.png (168.7 KB, 6 views)
Attached Files
File Type: txt system-files.txt (2.7 KB, 2 views)
File Type: txt BCs.txt (2.4 KB, 2 views)
boffin5 is offline   Reply With Quote

Old   June 7, 2024, 04:42
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello Alan,

Instead of trying to guess how it works, I suggest to read the header of the boundary condition, it will answer your question: https://github.com/OpenFOAM/OpenFOAM...hVectorField.H

Quote:
- The value is positive into the domain (as an inlet)
Numerically speaking, setting the flowrate is the same thing as setting the velocity. In your case there is no advantage in using flowrateInletVelocity instead of fixedValue.

Regarding your boundary conditions, p_rgh is useless as it is not solved by rhoPorousSimpleFoam. The other BCs look fine to me.

Quote:
Originally Posted by boffin5 View Post
For an MFR of 7496, I get psychedelic results for p and T, whereas U does nothing. But for an MFR of 1.0, the results are telling:
It shows a reduction of pressure in front of the radiator, which is the opposite of what one would expect. The temperature heats up on both sides of the radiator, but that should only happen on the exit side. Again, U does nothing.
For MFR=7496, U does not do nothing but goes all over the place, your color bar goes up to 5.6e34 m/s. Your case is probably diverging, it would be interesting to monitor the case and look where U is getting crazy. It might point out an issue with the mesh.

For MFR=1, you are basically setting an inlet velocity of 0.008m/s, so the temperature increasing on both sides of the radiator is not a big surprise since you have almost no velocity. The velocity picture still shows a color bar going up to 170 m/s, which does not make sense with such a low inlet velocity. It would be again interesting to know where this is happening, and if the location is the same as your other case with higher flowrate.
Yann is offline   Reply With Quote

Reply


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
Force on linearSpring seems to make no sense marxioxyz OpenFOAM Running, Solving & CFD 0 March 23, 2024 17:52
simpleFoam tutorial PitzDaily using Reynolds stress tensor (LRR RASModel) dlahaye OpenFOAM Running, Solving & CFD 24 August 4, 2023 15:29
CFD Fluent tutorial - Shell and tube heat exchanger - PROBLEM tom96 FLUENT 1 May 21, 2018 01:24
Periodic Fully Developed Pipe Flow - Results dont make sense twolf59 FLUENT 1 March 6, 2015 00:54
a way to make lots of money quick and easy no lies Dob Main CFD Forum 0 October 10, 2006 17:45


All times are GMT -4. The time now is 14:37.