CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Error in Reading Velocity at each time step while using TimeVarryingMappedFixedValue

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By vivek05
  • 2 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2018, 21:13
Smile Error in Reading Velocity at each time step while using TimeVarryingMappedFixedValue
  #1
New Member
 
Faiaz Khaled
Join Date: Oct 2017
Location: United States of America
Posts: 17
Rep Power: 8
faiazk is on a distinguished road
Hello Everyone,

I am relatively new to Openfoam. I am trying to simulate wind flow having turbulent velocity with logarithmic velocity profile close to the ground. for that purpose I am using timevarryingmappedFixedvalue at the inlet boundary condition for U. I also have the necessary velocity folders for each time step inside the inlet folder under boundarydata folder inside Constant. I was able to run a case for a smaller empty domain for upto 5 seconds. But, when I increase the time step and run it for a longer period (say like 30s) the solver blows up. I am sharing the control dictionary and the error I am getting in this thread. Please help me on this. I am just curious whether there something wrong with the mesh or not. Please note that this is just an empty domain. I am trying to get the correct velocity profile and turbulence intensity.

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application pisoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 30;

deltaT 0.03;

writeControl timeStep;

writeInterval 5;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

functions
{
probes
{
type probes;
libs ("libsampling.so");
writeControl timeStep;
writeInterval 5;

fields
And I am also sharing the error I am receiving once I run pisoFoam after reaching time 5.07. My time step is 0.03 and it went well till 5.04.

Quote:
Time = 5.04

Courant Number mean: 0.987221 max: 2.0711
smoothSolver: Solving for Ux, Initial residual = 0.0254167, Final residual = 6.02094e-06, No Iterations 9
smoothSolver: Solving for Uy, Initial residual = 0.0871783, Final residual = 5.66767e-06, No Iterations 11
smoothSolver: Solving for Uz, Initial residual = 0.0858853, Final residual = 8.63835e-06, No Iterations 10
GAMG: Solving for p, Initial residual = 0.145688, Final residual = 0.0127965, No Iterations 1
time step continuity errors : sum local = 5.17536e-05, global = -8.86575e-07, cumulative = -2.98201e-05
GAMG: Solving for p, Initial residual = 0.0311053, Final residual = 5.09854e-07, No Iterations 6
time step continuity errors : sum local = 2.06858e-09, global = -2.45448e-10, cumulative = -2.98203e-05
smoothSolver: Solving for k, Initial residual = 0.0797053, Final residual = 6.86189e+32, No Iterations 1000
bounding k, min: -8.15253e+41 max: 9.72954e+41 average: -6.62631e+35
ExecutionTime = 550.73 s ClockTime = 569 s

fieldAverage fieldAverage1 write:
Calculating averages

scalarTransport write:
smoothSolver: Solving for s, Initial residual = 0.129301, Final residual = 5.95047e-06, No Iterations 9

Time = 5.07

Courant Number mean: 0.988868 max: 2.08454
smoothSolver: Solving for Ux, Initial residual = 0.849795, Final residual = 0.00494518, No Iterations 1000
smoothSolver: Solving for Uy, Initial residual = 0.720148, Final residual = 0.000405804, No Iterations 1000
smoothSolver: Solving for Uz, Initial residual = 0.698049, Final residual = 0.00034483, No Iterations 1000
GAMG: Solving for p, Initial residual = 0.944956, Final residual = 0.0943667, No Iterations 8
time step continuity errors : sum local = 0.00432647, global = -0.000305037, cumulative = -0.000334857
GAMG: Solving for p, Initial residual = 6.08392e-12, Final residual = 6.08392e-12, No Iterations 0
time step continuity errors : sum local = 0.0311177, global = -0.000399824, cumulative = -0.000734681
smoothSolver: Solving for k, Initial residual = 0.999999, Final residual = 3.09126e-21, No Iterations 1
bounding k, min: -4.25568e+33 max: 9.2111e+36 average: 3.54553e+31
ExecutionTime = 577.16 s ClockTime = 596 s

fieldAverage fieldAverage1 write:
Calculating averages

scalarTransport write:
#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::GaussSeidelSmoother::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::GaussSeidelSmoother::smooth(Foam::Field<doub le>&, 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 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:?
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#8 Foam::functionObjects::scalarTransport::execute() at ??:?
#9 Foam::functionObjectList::execute() at ??:?
faiazk is offline   Reply With Quote

Old   September 29, 2018, 23:54
Default
  #2
Member
 
Vivek
Join Date: Mar 2018
Location: India
Posts: 54
Rep Power: 8
vivek05 is on a distinguished road
Hi Faiaz Khaled,
Your error is due to k(turbulent kinetic energy) .if you the error message ,the residuals of k are going upto 10^32..this may be one of reason for code blow up. Change your boundary conditions ok k file. And another thing you can modify is solver used for k in fvSolution

Thanks,
Vivek
faiazk likes this.
vivek05 is offline   Reply With Quote

Old   October 1, 2018, 14:55
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,


as it was pointed out by Vivek, it seems that you have problems in your k-equation.



Quote:
Originally Posted by vivek05 View Post
if you the error message ,the residuals of k are going upto 10^32.

Just a correction, it is not the residual value of k, it is the real cell values that are getting crazy.

  • To get rid of the problem, you should first use an upwind scheme for k
  • If you save the time steps, check out what your k field is doing and analyze why you get problems there. I expect to have such high values at bad cells or a mismatch of boundary conditions
  • Other options, as Vivek mentioned, are modifying your fvSolution settings but this is probably not the primary source; linear solver should (at the end) give the same result.
  • Another option is to use the field limiting object function to limit the values for k to reasonable quantities.
faiazk and vivek05 like this.
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; October 2, 2018 at 05:59.
Tobi is offline   Reply With Quote

Old   October 1, 2018, 15:04
Default Thank you
  #4
New Member
 
Faiaz Khaled
Join Date: Oct 2017
Location: United States of America
Posts: 17
Rep Power: 8
faiazk is on a distinguished road
Dear Mr. Vivek and Dr. Tobi,

Thank you very much. I will keep working on it and follow your suggestions.

I will get back to you people soon.

Thank you once again.

Regards,
Faiaz
faiazk is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 16, 2019 23:12
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52


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