# Erroneous pressure profile at the boundary cells (1D case)

 Register Blogs Members List Search Today's Posts Mark Forums Read

February 25, 2020, 11:47
Erroneous pressure profile at the boundary cells (1D case)
#1
Senior Member

Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 10
Hi,

I am trying to solve the following Laplacian equation in a 1D channel:
Code:
fvm::laplacian(var, p)
where 'var' is a variable computed before solving this equation.

I use a fixedValue boundary condition (inlet/ outlet) for pressure and zeroGradient boundary condition for velocity.

When I run the case, I notice that pressure at the boundary cells (inlet, outlet) are not accurate which show a larger slope (which shall not happen). See, Fig. 1 (near the inlet), Fig 2 (near the inlet), Fig. 3 (near the inlet and outlet). As, a consequence the flux computed is not accurate. At the end of the run (Fig. 3), I loose a subtantial amount of pressure gradient due to this artefact and my flow velocity is much slower that what shall actually be. In reality, the pressure profile in Fig. 3 must be a straight line (with constant slope) connecting 70 Pa near inlet and 0 Pa near outlet.

I tried refining the mesh, time step and different numerical solvers, schemes but could not solve the issue. In short, the pressure is happy to convergence to a wrong value at the boundaries and this happens in only 1 iteration (I reach a residual of e-20 in 1 iteration).

Any hints on how to solve this?
Attached Images
 Fig1.jpg (38.7 KB, 5 views) Fig2.jpg (41.9 KB, 5 views) Fig3.jpg (42.6 KB, 5 views)

 February 25, 2020, 14:04 #2 Member   Join Date: Dec 2018 Location: Darmstadt, Germany Posts: 87 Rep Power: 6 Hey there, your BCs seem to constrain the coupling of momentum and pressure equation. But to be sure, it would be good to know the set of equations that you are trying to solve. Here is a suggestion for your BCs. At the inlet: fixedValue for velocity, zeroGradient for pressure. At the outlet the opposite: zeroGradient for velocity, fixedValue for pressure (dynamic pressure p = 0). Hope this helps. Good luck!

 February 26, 2020, 08:30 #3 Senior Member   Saideep Join Date: Apr 2015 Location: INDIA Posts: 203 Rep Power: 10 I am solving the Darcys single phase flow equation. So, there is no momentum involved here. I solve for pressure (p) initially and then compute the velocity (U). I am aware of the fixed rate boundary conditions you specified but I cannot use them. I have varying flux based on fixed pressure gradient rather.

 February 26, 2020, 09:21 #4 Member   Join Date: Dec 2018 Location: Darmstadt, Germany Posts: 87 Rep Power: 6 Hey, if I understand the problem correctly, it seems that there are two possibilities to solve this equation: (1) prescribing a pressure gradient and solving for the velocity, (2) set the velocity and solve for the pressure. You are doing the latter. You said that you are solving for the pressure and then computing the velocity? What do you mean by that? Have you tried to supply a velocity field and see what pressure gradient is resulting from the darcy equation? To do this, it is crucial that you set the outlet to fixedValue 0. The pressure value obtained at the inlet will be depending on the velocity you prescribed. Hope this helps.

 Tags laplace equation, pressure and velocity