1D fluid test case
I am trying to think of a 1D fluid test case, where the flow is laminar and the fluid is near-compressible and the process is isothermal.
I was thinking of just a moving fluid grid with a pressure applied at an inlet, not sure what BC to use at the other end ...
Please let me know if you can think of any examples. I just need to test out a code.
Any hints are really appreciated.
If you just want to test your code, you could use the manufactured solution method and generate a solution for your case. It should be very simple for 1d NS, and you can test the order of accuracy of your code!
Hope this helps!
Thanks very much,
I'm not sure what you mean by 'the manufactured solution method', possibly you're referring to available CFD codes. I've written my own code and need to test it for a 1D test case before moving on to 2D. I've already tested a simple 1D case where velocity and density are constants just to test the discretization methods. I now need a test case where density, velocity and pressure all vary.
The only 1D example of this sort that I've seen is a fluid piston connected to a solid spring. I'm wondering if something similar can be done with just the fluid and replacing velocity of the fluid where it's connected to the solid with a known function. Also these test cases usually use gas but I'm using a near compressible flow so I assume would need a pressure or velocity inlet.
Would this be reasonable? I would really appreciate your help.
The method of manufactured solution consists in choosing an arbitrary solution (or vector solution) and modifying accordingly the governing equations by adding source terms so that the equations are satisfied. Here are two references:
Roache, P.J., Verification and validation in computational science and engineering, Albuquerque, NM: Hermosa Publishers, 1998
Roy, C. J., Review of code and solution verification procedures for computational simulation, Journal of Computational Physics, 205, pp. 131-156, 2005
So basically, you define your density, velocity and pressure to some infinitely differentiable function (usually trigonometric functions). You inject these solutions inside the PDE and extract the additional terms that you have to add to your discrete equations. In this way you can test the order of accuracy of your code (except bc which need some special treatments if not set to dirichlet)
Test a simple converging or diverging duct, use area at node same as actual 3d area.
|All times are GMT -4. The time now is 02:18.|