|
[Sponsors] |
[OpenFOAM] Stream function and wrong updating of calculated boundary condition |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 28, 2021, 10:48 |
[OpenFOAM] Stream function and wrong updating of calculated boundary condition
|
#1 |
New Member
Jayabrata Dhar
Join Date: Nov 2018
Posts: 17
Rep Power: 8 |
Hello everyone,
I am trying to solve the Darcy equations using the classical stream function formulation. Although it is a CLASSICAL CASE, I did not find any related thread regarding this topic, so decided to start a new thread. My question is simple, I solve for the stream function (named, p) using the LaplacianFoam and then find the velocities using the expressions (2D case): Code:
volVectorField gradP = fvc::grad(p); ux = -gradP.component(vector::Y); uy = gradP.component(vector::X); Code:
const vector ii(1, 0, 0); const vector jj(0, 1, 0); U = ii*ux + jj*uy; My right-left walls are cyclic and frontBack patches are empty. At the top and bottom walls (walls running parallel to x), p is set as uniform 0 since there is no penetration velocity (uy should be zero). From the expression above, uy at the top and bottom walls are just derivatives of p along x and must be zero (since p is constant at top and bottom walls). However, when I view the velocity file (U file), the calculated boundary values for uy at the top and bottom wall is not exactly 0. It has value one to two order magnitude lower than ux though (my ux is usually ~1e-03 and uy~1e-04 or lower, so nowhere close to eps of the system). Can anybody shed light on why this is occurring and how to circumvent the issue? It would be very helpful if anyone can point out why this simple fulfilment of the boundary condition is not working. PS: Later, I also tried to set uy as a separate file in 0-folder where the top and bottom conditions are set to uniform 0 and uy is read in each iteration using the Code:
uy.correctBoundaryConditions(); |
|
Tags |
darcy flow, openfoam, stream function method |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] How to define boundary condition variables by using previosly defined variables? | pawlo | OpenFOAM Community Contributions | 8 | September 13, 2020 12:37 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
Wrong Boundary Conditions (maximum number of iterations) in compressibleInterDyMFoam | silencebreak | OpenFOAM Running, Solving & CFD | 0 | September 11, 2017 08:05 |
Setting up cyclic boundary condition | KateEisenhower | OpenFOAM Pre-Processing | 6 | January 11, 2017 18:17 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |