CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

Reporting a bug in Allrun script on wingMotion case

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 10, 2018, 10:00
Exclamation Reporting a bug in Allrun script on wingMotion case
  #1
New Member
 
Iman Sabahi
Join Date: May 2018
Posts: 17
Rep Power: 8
i.sabahi is on a distinguished road
Hello dear all,


I encountered a simple bug which took me some time to resolve, so i thought i'd better post it here as well as report it on the OpenFOAM's original bug-reporting link.


So when you run the ./Allrun script on the wingMotion case in OpenFOAM 3.0 (Ubuntu 14.04) the terminal or the log shows the following error:

cp: target ‘constant/polyMesh/’ is not a directory

The simpleFoam case is run without a problem, but the pimpleDyMFoam case won't run. the reason being that the "polyMesh" folder won't be copied from the simpleFoam/constant directory, so the process can't continue.


The original ./Allrun script is as follows:

Quote:
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# Make 3D mesh in slab of cells.
cd wingMotion_snappyHexMesh
runApplication blockMesh
runApplication snappyHexMesh -overwrite

# Make a 2D mesh by extruding a patch and solve to steady state.
cd ../wingMotion2D_simpleFoam
runApplication extrudeMesh
runApplication createPatch -overwrite
cp -r 0.org 0
runApplication simpleFoam

# Copy the mesh from the steady state case and map the results to a
# mesh motion case, then solve transient.
cd ../wingMotion2D_pimpleDyMFoam
cp -r ../wingMotion2D_simpleFoam/constant/polyMesh/* constant/polyMesh/
cp -r 0.org 0
runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent
mv 0/pointDisplacement.unmapped 0/pointDisplacement
runApplication decomposePar
runParallel `getApplication` 4
runApplication reconstructPar

# ----------------------------------------------------------------- end-of-file
The problem is the "*" at the end of the first "cp -r .." line. so in order for the pimpleDyMFoam case to work, the "*" must be deleted. so the following ./Allrun file needs to be used instead:


Quote:
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# Make 3D mesh in slab of cells.
cd wingMotion_snappyHexMesh
runApplication blockMesh
runApplication snappyHexMesh -overwrite

# Make a 2D mesh by extruding a patch and solve to steady state.
cd ../wingMotion2D_simpleFoam
runApplication extrudeMesh
runApplication createPatch -overwrite
cp -r 0.org 0
runApplication simpleFoam

# Copy the mesh from the steady state case and map the results to a
# mesh motion case, then solve transient.
cd ../wingMotion2D_pimpleDyMFoam
cp -r ../wingMotion2D_simpleFoam/constant/polyMesh/ constant/polyMesh/
cp -r 0.org 0
runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent
mv 0/pointDisplacement.unmapped 0/pointDisplacement
runApplication decomposePar
runParallel `getApplication` 4
runApplication reconstructPar

# ----------------------------------------------------------------- end-of-file
I don't know if this bug is resolved in the following versions of OpenFOAM, but i thought I'd share. (I also reported the bug on the original OpenFOAM website.)


Regards
Iman
i.sabahi is offline   Reply With Quote

Reply

Tags
bug, cp command, pimpledymfoam, prallel, wingmotion


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
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 15:53
Parallel Moving Mesh Bug for Multi-patch Case albcem OpenFOAM Bugs 17 April 29, 2013 00:44
Parallel Moving Mesh Bug for Multi-patch Case albcem OpenFOAM 0 May 21, 2009 01:23
Possible bug in icoFoam msrinath80 OpenFOAM Bugs 6 November 19, 2007 18:35
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 13:24


All times are GMT -4. The time now is 13:05.