|
[Sponsors] |
Trying to apply linearRamp for flow velocity in DTCHull |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 16, 2023, 09:57 |
Trying to apply linearRamp for flow velocity in DTCHull
|
#1 |
New Member
Mark
Join Date: Sep 2020
Posts: 6
Rep Power: 6 |
Hi,
I have little experience with OpenFOAM. My goal is to analyse a hull resistance at speed growing from 0 to Umax, i.e 3 m/s. I've got openfoam-2212 and started with DTCHull project, I've put my custom hull STL there, decreased volume of "tank" and refinement level to 5. It worked well, but that was for constant flow velocity. I've decided to apply linearRamp there. Currently I am having issues when running runParallel $(getApplication) error Code:
Creating finite volume options from "constant/fvOptions" Selecting finite volume options type accelerationSource [6] [3] [0] [6] [6] --> FOAM FATAL IO ERROR: (openfoam-2212 patch=230110) [6] [3] [3] --> FOAM FATAL IO ERROR: (openfoam-2212 patch=230110) [3] Unknown fvOption type accelerationSource Valid fvOption types : 50 ( acousticDampingSource actuationDiskSource buoyancyEnergy buoyancyForce buoyancyTurbSource constantHeatTransfer directionalPressureGradientExplicitSource explicitPorositySource fixedTemperatureConstraint heatExchangerSource interRegionExplicitPorositySource jouleHeatingSource limitTemperature limitVelocity meanVelocityForce multiphaseMangrovesSource multiphaseMangrovesTurbulenceModel multiphaseStabilizedTurbulence patchCellsSource patchMeanVelocityForce radialActuationDiskSource radiation rotorDisk scalarCodedSource scalarFixedValueConstraint scalarPhaseLimitStabilization scalarSemiImplicitSource solidificationMeltingSource sphericalTensorCodedSource sphericalTensorFixedValueConstraint sphericalTensorPhaseLimitStabilization sphericalTensorSemiImplicitSource symmTensorCodedSource symmTensorFixedValueConstraint symmTensorPhaseLimitStabilization symmTensorSemiImplicitSource tabulatedAccelerationSource tabulatedHeatTransfer tabulatedNTUHeatTransfer tensorCodedSource tensorFixedValueConstraint tensorPhaseLimitStabilization tensorSemiImplicitSource variableHeatTransfer vectorCodedSource vectorFixedValueConstraint vectorPhaseLimitStabilization vectorSemiImplicitSource velocityDampingConstraint viscousDissipation ) [0] file: constant/fvOptions.velocityRamping at line 21 to 34. Here is my file constant/fvOptions Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: dev \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "refValues"; velocityRamping { type accelerationSource; active on; selectionMode all; U U; velocity { type scale; scale { type linearRamp; start 0; duration $duration; } value ($negUmax 0 0); } } Please advise The whole project is attached. |
|
June 16, 2023, 11:35 |
|
#2 |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 5 |
Hey!
Rather than using a fvOptions function, you could try uniformFixedValue as a boundary condition for U. It allows you to specify time-varying boundary conditions, so you can create your ramp |
|
June 16, 2023, 12:47 |
|
#3 |
New Member
Mark
Join Date: Sep 2020
Posts: 6
Rep Power: 6 |
Yes, I've done that as well.
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2212 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "../constant/refValues"; dimensions [0 1 -1 0 0 0 0]; // min flow velocity internalField uniform (0 0 0); boundaryField { #includeEtc "caseDicts/setConstraintTypes" inlet { type uniformFixedValue; value $internalField; uniformValue { value ($negUmax 0 0); type scale; scale { type linearRamp; start 0; duration $duration; } } } outlet { type outletPhaseMeanVelocity; alpha alpha.water; value $internalField; Umean $Umax; UnMean { value $Umax; type scale; scale { type linearRamp; start 0; duration $duration; } } } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } hull { type movingWallVelocity; value uniform (0 0 0); } } // ************************************************************************* // There was one advise from a developer "You need to define ramping function for the velocity at three points: inlet (BC type waveVelocity), outlet (BC type outletPhaseMeanVelocity) and you need the velocityRamping fvOption (which was recently renamed to accelerationSource). You need to ensure, that you have same parameters (ramp type, start and duration) for inlet, outlet and fvOption." I've fount it here Multiphase ramping functionality I've just changed quarterSineRamp to linearRamp. But solver shows the error above. |
|
June 16, 2023, 15:08 |
|
#4 |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 5 |
Oh okay, I thought that using uniformFixedValue in a very basic way at the inlet would be enough, like that:
Code:
<patchName> { type uniformFixedValue; uniformValue table ( (0 (0 0 0)) (5 (10 0 0)) ); } The ramp is properly defined if I am not mistaken, and you can leave the outlet with a zeroGradient condition? You are using interFoam correct? |
|
June 17, 2023, 12:39 |
|
#5 |
New Member
Mark
Join Date: Sep 2020
Posts: 6
Rep Power: 6 |
Ok. I removed constant/fvOptions
And made 0/U this way Code:
#include "../constant/refValues"; dimensions [0 1 -1 0 0 0 0]; // min flow velocity internalField uniform (0 0 0); boundaryField { #includeEtc "caseDicts/setConstraintTypes" inlet { type uniformFixedValue; uniformValue table ( (0 ( 0 0 0)) ($duration (10 0 0)) ); } outlet { type zeroGradient; } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } hull { type movingWallVelocity; value uniform (0 0 0); } } I need a whole body of water (and air) steadily increase velocity from 0 to Umax. In other words - like the boat (with the boundaries) start moving with growing speed in an infinite pond. Yes, I am using interFoam |
|
June 18, 2023, 13:59 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello Mark,
Just a side note: the link your provided about "accelerationSource" is from the OpenFOAM foundation branch (openfoam.org). You are using the ESI-OpenCFD branch (openfoam.com). "accelerationSource" does not exist in the OpenCFD branch, and this is why you get the error in your first post. Regards, Yann |
|
June 18, 2023, 14:47 |
|
#7 | |
New Member
Mark
Join Date: Sep 2020
Posts: 6
Rep Power: 6 |
Quote:
Hi Yann, thank you, I'll try to get the OpenFOAM foundation branch. thank you Yann, the OpenFOAM foundation branch works! Last edited by mm7; June 20, 2023 at 09:51. |
||
June 23, 2023, 10:59 |
|
#8 |
New Member
Mark
Join Date: Sep 2020
Posts: 6
Rep Power: 6 |
Though "accelerationSource" works ok, it is not exactly what I need.
The water coming from the inlet disturbs water in the tank. I want to model a boat runs with acceleration on undisturbed water. Like on a pond. So only the boat disturbs it. One way it would be to create a long block mesh with 0 velocity inlet/outlet, and move the hull along of it. I am afraid it will increase processing time. Another way is to keep the hull on same position relative to boundary and somehow move whole system - boat and boundary through the calm water. I hope I explained it well. Is it possible to define? |
|
September 20, 2023, 09:51 |
oam::error::printStack(Foam::Ostream&) at ??:? with icoFoam
|
#9 |
New Member
Sara
Join Date: Sep 2023
Posts: 1
Rep Power: 0 |
Hello everyone,
I have an error during the runing of my programe that looks like this: /*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 10 \\/ M anipulation | \*---------------------------------------------------------------------------*/ Build : 10-e450dce21ea5 Exec : icoFoam Date : Sep 20 2023 Time : 13:41:42 Host : "adminval-HP-EliteBook-8540w" PID : 9953 I/O : uncollated Case : /home/admin-val/Desktop/SARA_CURSO_OPENFOAM/PRUEBA_1/tubo nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0.3 Reading physicalProperties Reading field p Reading field U Reading/calculating face flux field phi Starting time loop Time = 0.35s Courant Number mean: 17.0316 max: 253.714 #0 Foam::error:rintStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::symGaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:? #4 Foam::symGaussSeidelSmoother::smooth(Foam::Field<d ouble>&, Foam::Field<double> const&, unsigned char, int) const at ??:? #5 Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #6 ? in "/opt/openfoam10/platforms/linux64GccDPInt32Opt/bin/icoFoam" #7 ? in "/opt/openfoam10/platforms/linux64GccDPInt32Opt/bin/icoFoam" #8 ? in "/opt/openfoam10/platforms/linux64GccDPInt32Opt/bin/icoFoam" #9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #10 ? in "/opt/openfoam10/platforms/linux64GccDPInt32Opt/bin/icoFoam" Floating point exception (core dumped) And I do not have any idea about where can be the error. The mesh is ok and I have checked it. Its about a curved tube where water flows Could you help me about finding the error? Thank you in advance, I am learning and I really consider your help |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VELOCITY vs VELOCITY IN STN FRAME vs RELATIVE VELOCITY | everest20 | FLUENT | 1 | July 13, 2015 09:35 |
How to apply velocity profile at inlet | Sam | CFX | 12 | April 1, 2012 07:52 |
Fluent UDF load and apply inlet velocity b.c. | Knut Lehmann | Main CFD Forum | 2 | June 29, 2007 05:53 |
Velocity Under-relaxation in SIMPLE type methods | Matt U. | Main CFD Forum | 6 | July 4, 2005 06:29 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |