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

Time step data error in OpenFOAM tutorial flow around a cylinder?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2021, 00:51
Default Time step data error in OpenFOAM tutorial flow around a cylinder?
  #1
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
I have tried to run tutorial 2.2 flow around a cylinder for Openfoam from their website using the ./Allrun command. However the model never does show up in paraview and it gives me an error output saying that it contains no timestep data. I attached the images to this post. Does anyone know what I have to do to fix this.
Attached Images
File Type: jpg Screenshot (15).jpg (86.0 KB, 36 views)
File Type: jpg Screenshot (16).jpg (74.9 KB, 37 views)
Kendawgg22 is offline   Reply With Quote

Old   June 29, 2021, 01:28
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
Do you see time step folders after running the case? May be it crashed before finishing the first time step.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 2, 2021, 12:51
Default
  #3
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
The 0 file is there. I opened the file and attached it to this post. Now this is a tutorial. I opened both the P and U files. Is there something missing in these files maybe an error in one of the lines?
Attached Images
File Type: jpg Screenshot (17).jpg (60.3 KB, 18 views)
File Type: jpg Screenshot (18).jpg (50.2 KB, 14 views)
File Type: jpg Screenshot (19).jpg (60.9 KB, 9 views)
File Type: jpg Screenshot (20).jpg (50.9 KB, 9 views)
Kendawgg22 is offline   Reply With Quote

Old   July 2, 2021, 18:26
Default
  #4
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
Hi Ken,


If you look at the picture you posted, the solver didn't run because it says you have to remove the old log files first. Once you delete them, the solver should be able to run. It's probably a precaution mechanism to prevent loss of log files.
Ship Designer is offline   Reply With Quote

Old   July 6, 2021, 13:00
Default
  #5
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
It actually gave me that error when I first ran it. I just ran it again and it still gives that same error. It has something to do with the 0 file but I don't see where the error is coming from in that file after looking at it?
Kendawgg22 is offline   Reply With Quote

Old   July 7, 2021, 01:51
Default
  #6
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
Look in the main folder for the log files and remove them.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 13, 2021, 16:04
Default
  #7
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
Are you talking about log.blockMesh, log.postProcess, and log.potentialFoam? Remove these?
Attached Images
File Type: jpg Screenshot (21).jpg (45.6 KB, 10 views)
Kendawgg22 is offline   Reply With Quote

Old   July 15, 2021, 14:55
Default
  #8
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
Quote:
Originally Posted by Kendawgg22 View Post
Are you talking about log.blockMesh, log.postProcess, and log.potentialFoam? Remove these?
Yes, these are what Uwe is talking about. They won't be overwritten, but OpenFOAM will just abort execution instead. Remove them manually and it should start.
Ship Designer is offline   Reply With Quote

Old   November 29, 2021, 01:36
Default
  #9
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
I know that it has been quite a while. I want to let you know that I did try deleting the log files before I tried the Allrun again and I still got the same error.
Kendawgg22 is offline   Reply With Quote

Old   November 30, 2021, 05:00
Default
  #10
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
Hi, have you tried to execute the commands of the Allrun script individually? By doing that you should see at which point execution is stopped due to errors. I also recommend running longer commands like snappyHexMesh and solvers with both on-screen and logged output like this:
Code:
# single-core
snappyHexMesh -overwrite | tee Logs/snappyHexMesh.txt
interFoam | tee Logs/interFoam0.txt

# parallel
mpirun -np 2 interFoam -parallel | tee Logs/interFoam0.txt
This will allow you to monitor ongoing processes. I remember using Allrun or runapplication or something like that and having no on-screen output for hours whatsoever until the solver eventually finished, which I don't like at all and that's why I never use those commands. Bear in mind that if you use the above, the applications won't stop if older logs already exist, they will just be overwritten instead.

Hope this helps.

Cheers, Claudio
Ship Designer is offline   Reply With Quote

Old   December 4, 2021, 13:55
Default
  #11
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
I don’t know how to do that. I’m honestly ready for someone to go through tutorial 2.2 which is a flow around a cylinder for windows 10 from start to finish to show me where I’m going wrong. I tried doing it the same way you do the cavity tutorial where you just type blockmesh but it gave me errors. Actually it didn’t even run. I did it using allrun because I was told it’ll run and show where the error is. I haven’t seen any decent enough tutorials online for tutorial 2.2 for some reason.
Kendawgg22 is offline   Reply With Quote

Old   December 12, 2021, 12:44
Default
  #12
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
Can you please indicate which version of OpenFOAM you're using and in which folder the tutorial is you are trying to run?
Ship Designer is offline   Reply With Quote

Old   December 13, 2021, 18:44
Default
  #13
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
I am using version 2012 for windows 10 with Ubuntu 20.04lts.
Kendawgg22 is offline   Reply With Quote

Old   December 13, 2021, 20:09
Default
  #14
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
If you can provide me the exact location in the tutorials folder where the tutorial you're trying to run is, I might help you further. I simply don't have time to find it for you.
Ship Designer is offline   Reply With Quote

Old   December 15, 2021, 04:51
Default
  #15
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
It’s located in OpenFOAM/OpenFOAM-v2012/tutorials/basic/potentialFoam/cylinder
Kendawgg22 is offline   Reply With Quote

Old   December 15, 2021, 19:58
Default
  #16
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
Okay, these are the contents of the Allrun file:
Code:
#!/bin/sh
cd "${0%/*}" || exit                                # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions        # Tutorial run functions
#------------------------------------------------------------------------------

restore0Dir
runApplication blockMesh
runApplication $(getApplication) -withFunctionObjects -writePhi -writep
runApplication postProcess -func streamFunction

#------------------------------------------------------------------------------
Instead of executing the Allrun script, run the following commands one by one in your terminal (or however it is called on Windows) by omitting the runApplication function. Then you can see where exactly errors occur and you can report them to us:
Code:
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions
Code:
restore0Dir
Note that restore0Dir copies the 0.orig folder and renames it to 0. You can do this also manually. Background: The field files inside the 0 folder, in this case U and p, contain the initial boundary conditions for the case. When results are written or certain preprocessing steps are taken however, the boundary conditions get replaced and overwritten in the field files by a list of values for each cell in the domain. In many cases they will be left untouched and the results are written to another time step folder. Since the potentialFoam solver doesn't use time steps however, this is one of the cases where running the solver will overwrite the initial U and p files inside the 0 folder and you would loose the initial boundary conditions. To avoid that, the purpose of the 0.orig folder is therefore to serve as a template/copy for the initial conditions it contains. Solvers don't read it however because they look for the 0 folder without .orig suffix. If a solver doesn't find the 0 folder, it will complain that it doesn't find the field files. Thus, copy the 0.orig folder and rename it to 0 in order to have a copy of the initial fields that can be read by solvers and safely overwritten.

Code:
blockMesh
Code:
potentialFoam -withFunctionObjects -writePhi -writep
Note: The function getApplication in the Allrun script reads the application dictionary entry of the controlDict file, which in this case is potentialFoam.
Code:
postProcess -func streamFunction
I tried this with OpenFOAM v1912 on macOS and it worked. Only thing I had to do was change the -writePhi option of potentialFoam to -writephi, because postProcess -func streamFunction requires the phi field.

Good luck!
Attached Images
File Type: jpg streamFunction.jpg (33.8 KB, 5 views)
Ship Designer is offline   Reply With Quote

Old   December 23, 2021, 00:22
Default
  #17
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
Is this how I was suppose to do those commands? I took screenshots of what I typed.
Attached Images
File Type: jpg Screenshot (26).jpg (109.9 KB, 8 views)
File Type: jpg Screenshot (27).jpg (81.2 KB, 4 views)
File Type: jpg Screenshot (28).jpg (66.0 KB, 3 views)
Kendawgg22 is offline   Reply With Quote

Old   December 23, 2021, 12:13
Default
  #18
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
Yes, exactly. As you can see, blockMesh fails (and doesn't create the mesh, hence the subsequent error reported by potentialFoam not finding the points file) because the shared object (*.so) file is not found/inaccessible. The blockMeshDict of this case performs some in-dictionary calculations using codeStream to obtain parametric geometry and generates an *.so file which is then compiled. Check if this file is properly written at the specified location. My guess would be a file access permission issue which prevents OpenFOAM from writing/reading the *.so file from there.

Now you should have learned how to do basic troubleshooting for an OpenFOAM case: execute commands one by one and carefully read all error messages.

Good luck troubleshooting codeStream!
Ship Designer is offline   Reply With Quote

Old   December 30, 2021, 03:01
Default
  #19
New Member
 
Ken Johnson
Join Date: Jun 2020
Posts: 23
Rep Power: 6
Kendawgg22 is on a distinguished road
I think should explain what I am trying to do. I am trying to simulate a flow over a cylinder with mach 0.2 at sea level conditions. The radius of the cylinder is 0.04 meters and the length is 1 meter. I was hoping to modify this tutorial but that hasn't been working out. I would like to know if there is a easier way then?
Kendawgg22 is offline   Reply With Quote

Old   December 30, 2021, 21:11
Default
  #20
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
What about the tutorial, is it working for you now? We can't help if you aren't more specific than "that hasn't been working out". Please read this: Guide: How to ask a question on the forums
Ship Designer 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
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? EternalSeekerX SU2 3 October 9, 2020 19:28
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 12:08
Stuck in a Rut- interDyMFoam! xoitx OpenFOAM Running, Solving & CFD 14 March 25, 2016 08:09
AMI interDyMFoam for mixer nu problem danny123 OpenFOAM Programming & Development 8 September 6, 2013 03:34
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03


All times are GMT -4. The time now is 01:02.