|
[Sponsors] |
Execution of setFields changes boundary condition types |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 21, 2019, 04:11 |
Execution of setFields changes boundary condition types
|
#1 |
Senior Member
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18 |
Dear all,
I'm playing around with the velocity ramping functionality for multiphase flows (OpenFOAM-dev, build dev-54cb927cee89, on Scientific Linux cluster). At the moment I'm trying to adapt the DTCHull tutorial case to include a quarter sine velocity ramp at start-up. I've included the required fvOptions file in constant, adapted the simulation parameters to run a transient simulation (the original tutorial uses local time stepping), and added ramping to my inlet and outlet BCs in 0/U. However, after running setFields, my outlet velocity ramping BC changes back to the original outletPhaseMeanVelocity, without velocity ramping. I've already removed all occurrences of #includeEtc "caseDicts/setConstraintTypes", but still my ramping BC keeps disappearing. Surely there must be something very silly that I'm overlooking here, but right now I can't find it. Does anyone have experience with this? Thanks in advance, Sita |
|
May 21, 2019, 05:24 |
Solved
|
#2 |
Senior Member
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18 |
Got it: I was using the wrong syntax for the velocity ramping BCs
|
|
September 29, 2022, 04:07 |
|
#3 |
New Member
Seyfi Girgin
Join Date: Aug 2015
Posts: 12
Rep Power: 10 |
||
September 29, 2022, 07:09 |
|
#4 |
Senior Member
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18 |
Ouch, that was a long time ago; I changed jobs in the meantime...
I looked up some old code, here's the contents of the 0/u file, hopefully that'll help you: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format binary; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "../constant/refValues"; dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { // hull parts ".*\$_s[0-9]_b[0-9]" { type movingWallVelocity; value uniform (0 0 0); } // symmetry plane _ymin { type symmetryPlane; } // atmosphere _zmax { type pressureInletOutletVelocity; value uniform (0 0 0); } // outlet _xmin { type outletPhaseMeanVelocity; alpha alpha.water; value $internalField; UnMean { value $Uref; type scale; scale { type quarterSineRamp; start 0; duration $duration; //#calc "400*$deltaT"; } } } // far side of box _ymax { type zeroGradient; } // bottom of box _zmin { type zeroGradient; } // inlet _xmax { type uniformFixedValue; value $internalField; uniformValue { value (#neg $Uref 0 0); type scale; scale { type quarterSineRamp; start 0; duration $duration; //#calc "400*$deltaT"; } } } } // ************************************************************************* // |
|
September 29, 2022, 12:29 |
|
#5 | |
New Member
Seyfi Girgin
Join Date: Aug 2015
Posts: 12
Rep Power: 10 |
Quote:
|
||
September 29, 2022, 14:25 |
|
#6 |
Senior Member
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18 |
Usually you start by saying something like, hey, thanks for trying to help!
But anyway, this is the original 0/U file, with a working velocity ramping BC at _xmin. The code at the beginning, under // hull parts, contains regex to refer to different hull parts in the mesh file. As I mentioned earlier, I changed jobs in the meantime, so I don't exactly remember all the details of this, and can't test if the file still works under the current version of OpenFOAM. Hope this helps. P.S. This 0/U file is not the one for the DTCHull tutorial case, but for a very similar ship simulation, hence the different names, but the velocity ramping BC at the domain inlet (called _xmin here) is the same. Last edited by sita; September 30, 2022 at 05:19. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cyclic boundary condition in foam-extend 4.0 | rellumeister | OpenFOAM Pre-Processing | 2 | March 3, 2020 08:03 |
Constant mass flow rate boundary condition | sahm | OpenFOAM | 0 | June 20, 2018 22:45 |
Changing Boundary Condition Types via Scheme/UDF | RTN3000 | Fluent UDF and Scheme Programming | 6 | November 3, 2015 16:28 |
External Radiation Boundary Condition for Grid Interface | CFD XUE | FLUENT | 0 | July 9, 2010 02:53 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 06:49 |