CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How many boundary conditions do we need for the pressure?

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2023, 02:44
Default
  #81
New Member
 
Shawn L Davison
Join Date: Sep 2023
Location: 105 Hillcrest Circle, Golden Valley, MN 55427
Posts: 1
Rep Power: 0
shawnldavison is on a distinguished road
I'm still confused. As a Sitecore developer, I think it's too hard for me.
shawnldavison is offline   Reply With Quote

Old   October 27, 2023, 23:11
Default
  #82
Member
 
Join Date: Apr 2021
Location: Finland
Posts: 41
Rep Power: 5
Winston Virtaus is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
You should do the test at constant dt/h ratio, that could solve your issue.
I made some modifications and bugfixes to the code and improved the test setup for the proper constant deltaT/h ratio.

It seems that the divergence error now scales approximately with respect to O(deltaT*h^2) with some small variance. Is this the expected result for APM?

The plot is from one of the Poisseule flow test runs (Re = 3) with constant deltaT/h = 0.6 ratio and the results are taken at t = 2.0s.
Attached Images
File Type: png meshScaling3.png (14.9 KB, 6 views)
Winston Virtaus is offline   Reply With Quote

Old   October 28, 2023, 04:29
Default
  #83
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Winston Virtaus View Post
I made some modifications and bugfixes to the code and improved the test setup for the proper constant deltaT/h ratio.

It seems that the divergence error now scales approximately with respect to O(deltaT*h^2) with some small variance. Is this the expected result for APM?

The plot is from one of the Poisseule flow test runs (Re = 3) with constant deltaT/h = 0.6 ratio and the results are taken at t = 2.0s.



COuld you superimpose the ideal slop on the figure? Hae you used the max norm on the error?
FMDenaro is offline   Reply With Quote

Old   October 28, 2023, 14:31
Default
  #84
Member
 
Join Date: Apr 2021
Location: Finland
Posts: 41
Rep Power: 5
Winston Virtaus is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
COuld you superimpose the ideal slop on the figure? Hae you used the max norm on the error?

Here's the version with the ideal slope.

Yes, maximum error was used (L infinity norm).
Attached Images
File Type: png meshScaling4.png (16.2 KB, 7 views)
Winston Virtaus is offline   Reply With Quote

Old   October 28, 2023, 14:38
Default
  #85
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Winston Virtaus View Post
Here's the version with the ideal slope.

Yes, maximum error was used (L infinity norm).



That seems fine, you can check your solver for a full unsteady analytical solution (Taylor) to further check for any bugs.
FMDenaro is offline   Reply With Quote

Old   October 28, 2023, 14:55
Default
  #86
Member
 
Join Date: Apr 2021
Location: Finland
Posts: 41
Rep Power: 5
Winston Virtaus is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
That seems fine, you can check your solver for a full unsteady analytical solution (Taylor) to further check for any bugs.
Thanks for the comments, much appreciated!

I'll see what kind of bugs i can find from the unsteady vortex case.

Just as a side note, is there a way to know when the divergence error can be considered small enough?
I've seen suggestions from 1e-3 to 1e-8 being used as a criterion but i dont think i've seen any guidelines if the criterion should be case specific.
Winston Virtaus is offline   Reply With Quote

Old   October 28, 2023, 16:10
Default
  #87
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Winston Virtaus View Post
Thanks for the comments, much appreciated!

I'll see what kind of bugs i can find from the unsteady vortex case.

Just as a side note, is there a way to know when the divergence error can be considered small enough?
I've seen suggestions from 1e-3 to 1e-8 being used as a criterion but i dont think i've seen any guidelines if the criterion should be case specific.



Working in non-dimensional form, that is with a velocity field =O(1), getting 10^-5-10^-6 is good. That level of errors is easy in the exact projection, not so easy in the approximate one.


If you have a dimensional form, scale the values with the proper lenght and velocity.
FMDenaro is offline   Reply With Quote

Old   October 28, 2023, 23:16
Default
  #88
Member
 
Join Date: Apr 2021
Location: Finland
Posts: 41
Rep Power: 5
Winston Virtaus is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Working in non-dimensional form, that is with a velocity field =O(1), getting 10^-5-10^-6 is good. That level of errors is easy in the exact projection, not so easy in the approximate one.


If you have a dimensional form, scale the values with the proper lenght and velocity.

The strategy seems helpful, i didn't think of using length and velocity scaling before!

Yes dimensional form is being used.

Thus, having 0.2 m channel height and 0.66 m/s bulk velocity, this would then give me a O(1) normalization factor which would mean that final two meshes would produce the error in the 1e-5 to 1e-6 range indicating decent incompressibility.

This method would make order of magnitude estimation of incompressibility fairly straightforward
Winston Virtaus is offline   Reply With Quote

Old   December 21, 2023, 14:10
Default
  #89
Member
 
Join Date: Apr 2021
Location: Finland
Posts: 41
Rep Power: 5
Winston Virtaus is on a distinguished road
After alot of code debugging I was finally able to produce the taylor-green vortex 2D case with acceptable error levels. The case is actually harder than it looks. There were several small bugs in the code which produced cumulatively enough error to destabilise the flow. The smaller vortices had a tendency to collapse into one big vortex.

Case Setup: 80x80 grid at [-π,π],[-π,π] domain, dirichlet conditions for physical velocity, nonhomogenous poisson for pressure, dt/h = 0.01, simulated until t=1.5s.

The velocity and pressure gradient errors dont exhibit numerical boundary layers, but there seems to be something strange going on with the velocity divergence near boundaries, its almost two orders of magnitude higher than the interior error. Is this something that actually happens with dirichlet boundaries or it just a hidden bug somewhere? It only happens with dirichlet velocity boundaries and is nonexistent in poisseule flow with neumann conditons.
Attached Images
File Type: png velocity.png (136.4 KB, 6 views)
File Type: png pressureGradient.png (174.2 KB, 5 views)
File Type: png velocityDivergence.png (41.1 KB, 4 views)
Winston Virtaus is offline   Reply With Quote

Old   December 21, 2023, 16:37
Default
  #90
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Winston Virtaus View Post
After alot of code debugging I was finally able to produce the taylor-green vortex 2D case with acceptable error levels. The case is actually harder than it looks. There were several small bugs in the code which produced cumulatively enough error to destabilise the flow. The smaller vortices had a tendency to collapse into one big vortex.

Case Setup: 80x80 grid at [-π,π],[-π,π] domain, dirichlet conditions for physical velocity, nonhomogenous poisson for pressure, dt/h = 0.01, simulated until t=1.5s.

The velocity and pressure gradient errors dont exhibit numerical boundary layers, but there seems to be something strange going on with the velocity divergence near boundaries, its almost two orders of magnitude higher than the interior error. Is this something that actually happens with dirichlet boundaries or it just a hidden bug somewhere? It only happens with dirichlet velocity boundaries and is nonexistent in poisseule flow with neumann conditons.

Are you sure to prescribe the Dirichlet BC at the correct time from the analytical solution?
I had a lot of work and experience on such test-case but many years ago, I don't remember all the things I did.
However, details are in my papers and can be useful.
The most relevant thing is to check the correct scaling of the error for vanishing grid size. Using only one grid cannot help.
Use the max norm to see where the error is produced during the scaling.
You wil find a lot of figures about the error scaling in my papers.
FMDenaro is offline   Reply With Quote

Old   December 21, 2023, 17:52
Default
  #91
Member
 
Join Date: Apr 2021
Location: Finland
Posts: 41
Rep Power: 5
Winston Virtaus is on a distinguished road
I'll take a look if there are still some bugs with the prescribed dirichlet velocity and see if I find something useful from the papers
Winston Virtaus is offline   Reply With Quote

Reply

Tags
pressure b.c


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
What are the best settings for a channel flow simulation? Ashkan Kashani CFX 3 October 13, 2022 21:36
Fail to converge when solving with a fabricated solution zizhou FLUENT 0 March 22, 2021 06:33
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 08:44
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 04:39
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00


All times are GMT -4. The time now is 22:21.