|
[Sponsors] |
Compile boundary condition as a new dynamic library |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 9, 2019, 06:57 |
|
#21 | |
New Member
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7 |
Quote:
How may I modify this for flow in the y-direction with the inlet centre at coordinates [0 -0.010 0] Thanks, Lauren |
||
February 5, 2020, 11:53 |
Parabolic Velocity condition
|
#22 |
New Member
Syed Faisal Pasha Quadri
Join Date: Feb 2020
Posts: 1
Rep Power: 0 |
My bad
I am not able to implement parabolic velocity condition though I followed the instructions.Can anyone please help me in solving this issue. Thanks and Regards syedfaisalpasha |
|
January 21, 2021, 06:53 |
Solution: paraboloid velocity profile
|
#23 |
New Member
pardoa
Join Date: May 2018
Posts: 29
Rep Power: 8 |
Hello everyone,
This is an old post that helped me a lot to code the paraboloid profile that I wished to define my velocity BC at the inlet from an input flowrate. I post here the piece of code for anyone who wishes/needs to use it: Code:
// Get range and orientation boundBox bb(patch().patch().localPoints(), true); //Parabola centre vector paraCtr = vector(0.5*(bb.max() + bb.min()).x(),0.5*(bb.max() + bb.min()).y(),bb.max().z()); // For an open channel with paraCtr at the top centre //Patch faces centres const vectorField& cellCtr = patch().Cf(); //Patch face normal vectors vectorField n(patch().nf()); // Patch mean normal: weighted mean of patch face normal vectors vector n_vector = gSum(patch().magSf()*n)/gSum(patch().magSf()); //Depth direction vector depthDir = (0 0 1); //Transversal direction vector transDir = n_vector ^ depthDir; // Patch height and width scalar pHeight = ((bb.max() - bb.min()) & depthDir); scalar pWidth = ((bb.max() - bb.min()) & transDir); // Calculate local 1-D coordinate for the parabolic profile scalarField verCoord = ((cellCtr - paraCtr) & depthDir_)/pHeight; scalarField horCoord = ((cellCtr - paraCtr) & transDir)/(0.5*pWidth); // Multiply by 0.5 to get the distance from the centre of the parabola to the patch end //Mean velocity scalar avgU = -flowRate/gSum(patch().magSf()); // Mean velocity multiplier to get the max velocity (centreline velocity) scalar avgUmulti=2; operator==(n*avgUmulti*avgU*(1.0 - sqr(verCoord))*(1.0 - sqr(horCoord))); Álvaro |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compile errors of boundary condition "expDirectionMixed" | liying02ts | OpenFOAM Bugs | 2 | February 1, 2010 21:11 |
how to set up a wall boundary condition according to calculated wall shear stress? | gameoverli | OpenFOAM Pre-Processing | 1 | May 21, 2009 09:28 |
How to define a dynamic Boundary Condition? | abrahamgx | CFX | 2 | March 10, 2009 00:03 |
How to define a dynamic Boundary Condition? (New) | abrahamgx | CFX | 2 | March 9, 2009 08:43 |
Dynamic Temperature Boundary Condition | Kshitij | FLUENT | 0 | October 12, 2005 14:40 |