# Problems with applying thoms formula

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

 February 15, 2022, 02:54 Problems with applying thoms formula #1 New Member   Patryk Join Date: Dec 2021 Posts: 5 Rep Power: 2 Hello everyone. I'm working on a solver that solves vorticiy-stream function equation. One of the things I wanted to apply, to one of my case, was 0 velocity at the boundary. To achieve that, I wasn't simply applying 0 velocity at the boundary, since I'm not using primitive variables. My idea was to, make such boundary condition that will create vortex itself, that in result of "mixing" will create a 0-velocity slice near the wall. So this is a code of my Thoms formula, atleast this is what i think its called. Code: const fvPatch& boundaryPatch = patch(); // this patch // make a reference to the mesh so that I can access variables const fvMesh& mesh = patch().boundaryMesh().mesh(); const volScalarField& psi = db().lookupObject("psi"); const volScalarField& OM = db().lookupObject("OM"); label inletPatchID = mesh.boundaryMesh().findPatchID("bottom"); label inletPatchID2 = mesh.boundaryMesh().findPatchID("left"); // Get reference to boundary field value const scalarField& psib = psi.boundaryField()[inletPatchID]; const scalarField& OMb = OM.boundaryField()[inletPatchID]; // get coordinate for cell centres const fvPatchVectorField& centre = mesh.C().boundaryField()[inletPatchID]; const fvPatchVectorField& centreleft = mesh.C().boundaryField()[inletPatchID2]; //const fvPatchVectorField& centre = mesh.C().boundaryField()[inletPatchID]; //area of patch scalarField areasc = mesh.magSf().boundaryField()[inletPatchID]; scalarField OMwall = OMb; scalar area = sum(areasc); scalar d; // THOMAS FORMULA forAll (psib, cellI) { d = mag(mesh.C()[cellI].component(vector::Y) - centre[cellI].component(vector::Y)); OMwall [cellI] = -2.0*psib[cellI]/(d*d); } Info << (OMwall); operator==(OMwall); Generally all i want to achieve is the vorticity at the wall that will be equal to: =

 Tags boundary condition, cfd, vorticity

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post subhasisa.rath OpenFOAM CC Toolkits for Fluid-Structure Interaction 0 September 6, 2021 16:37 NoITMan Main CFD Forum 0 May 25, 2021 06:52 tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 11:12 mahendrark FLUENT 2 June 15, 2020 07:13 Mechstud Main CFD Forum 4 July 26, 2011 12:13

All times are GMT -4. The time now is 03:32.