|
[Sponsors] |
Using atmBoundaryLayerInletVelocity with a CSV file or table |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 15, 2022, 16:50 |
Using atmBoundaryLayerInletVelocity with a CSV file or table
|
#1 |
New Member
Join Date: Mar 2022
Posts: 1
Rep Power: 0 |
Dear All,
I am using atmBoundaryLayerInletVelocity for my velocity inlet and one my variables needs to be time dependent (Uref). I have CSV file of my Uref with time varying. on this link, I found a solution but i have some errors: https://www.openfoam.com/news/main-n...ary-conditions my error is: Code:
FOAM FATAL ERROR: (openfoam-2112) [9] unallocated autoPtr of type N4Foam9Function1INS_6VectorIdEEEE [9] [9] From T* Foam::autoPtr<T>::operator->() [with T = Foam::Function1<Foam::Vector<double> >] [9] in file /project/dsi/apps/easybuild/software/OpenFOAM/v2112-foss-2021b/OpenFOAM-v2112/src/OpenFOAM/lnInclude/autoPtrI.H at line 178. [9] [0] [1] [1] I tried to use table and my 0/U file is: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Uinlet (-5 -5 0); dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { Inlet { type atmBoundaryLayerInletVelocity; flowDir table ( ( 0 (1 0 0)) ( 10 (1 0 0)) ( 20 (0 1 0)) ( 100 (0 1 0)) ); zDir (0 0 1); Uref table ( ( 0 10) ( 10 10) ( 20 20) ( 100 20) ); Zref 20; z0 uniform 0.1; zGround uniform 935.0; } outlet { type pressureInletOutletVelocity; value uniform (0 0 0); } wall { type noSlip; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // Bests, Hadi |
|
March 29, 2022, 08:22 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
I think there is a bug being introduced recently. Apply the changes below and see if your case runs.
Code:
+++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C @@ -115,10 +115,10 @@ atmBoundaryLayer::atmBoundaryLayer(const atmBoundaryLayer& abl) ppMin_(abl.ppMin_), time_(abl.time_), patch_(abl.patch_), - flowDir_(abl.flowDir_), - zDir_(abl.zDir_), - Uref_(abl.Uref_), - Zref_(abl.Zref_), + flowDir_(abl.flowDir_.clone()), + zDir_(abl.zDir_.clone()), + Uref_(abl.Uref_.clone()), + Zref_(abl.Zref_.clone()),
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
June 1, 2022, 13:25 |
|
#3 |
New Member
Juan Salazar
Join Date: Jun 2019
Posts: 19
Rep Power: 7 |
I also came across this bug, even when using a constant value for Uref. The issue arises when using a transient solver such as pimplefoam. Can confirm the patch works. Thanks!
|
|
Tags |
autoptr, csv, csvfile |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 17:18 |
OpenFoam "Permission denied" and "command not found" problems. | iyidaniel@yahoo.co.uk | OpenFOAM Running, Solving & CFD | 11 | January 2, 2018 07:47 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 10:07 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 06:18 |