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

Allrun for SHM and LTSInterFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 15, 2012, 23:31
Default Allrun for SHM and LTSInterFoam
  #1
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 15
laurent98 is on a distinguished road
hi everybody
i try to run a calculation with this Allrun copy and modify from what i found on tutorial and on web
can some one tell me what doing this 2 lines?

find . -type f -iname "*level*" -exec rm {} \;
ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1

here the allrun script;
Code:
#!/bin/sh
cd ${0%/*} || exit 1    # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication topoSet -dict cRefine.topoSetDict
runApplication refineMesh -overwrite -dict
rm log.refineMesh > /dev/null 2>&1
rm log.topoSet > /dev/null 2>&1
runApplication topoSet -dict cRerefine.topoSetDict
runApplication refineMesh -overwrite -dict

cp system/decomposeParDict-nonPar system/decomposeParDict
runApplication  decomposePar 
cp system/decomposeParDict-par system/decomposeParDict
runParallel snappyHexMesh 4  -overwrite

runApplication reconstructParMesh -constant
runApplication reconstructPar  # -constant -time 0
cp 0/alpha1.org 0/alpha1
runApplication setFields
find . -type f -iname "*level*" -exec rm {} \;
ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1

runApplication setFields
rm log.decomposePar > /dev/null 2>&1
runParallel changeDictionary 4   -literalRE # Set boundary conditions
runApplication  decomposePar
runParallel renumberMesh 4 -overwrite #slight improvement in speed
runParallel  `getApplication` 4
runApplication reconstructParMesh -constant
runApplication reconstructPar
# ----------------------------------------------------------------- end-of-file# #
i fill to be nearly there, after losing some hairs, the error message in log.LTSInterfoam is;
[0] --> FOAM FATAL IO ERROR:
[0] size 679545 is not equal to the given value of 169885
[0]
[0] file: /mnt/disk2/laurent/boats/calculOF/laurent-2.1.x/hulls/a_04_refinemesh_parallel/processor0/0/alpha1 from line 18 to line 681403.
[0]


all suggestion or remarques will be very well come!
thanks you by advance for help!
LL
laurent98 is offline   Reply With Quote

Old   November 18, 2012, 06:58
Default
  #2
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 15
laurent98 is on a distinguished road
hello Foamers,
to make my question simple; if i want to run SHM and solver in parallel, do i need to reconstructPar, between SHM and the solver....
thanks you very much by advance
laurent98 is offline   Reply With Quote

Old   November 18, 2012, 16:22
Default
  #3
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 17
sail is on a distinguished road
My guess is that you have still some processoN folder between after thw snappy reconstruct and the decomposition before the LTS and this might cause issues in cell number. I'd try to remove them in between.
__________________
http://www.leadingedge.it/
Naval architecture and CFD consultancy
sail is offline   Reply With Quote

Old   November 18, 2012, 19:00
Default
  #4
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 23
Lieven will become famous soon enough
Dear Laurent,
Regarding the two command lines:

Quote:
find . -type f -iname "*level*" -exec rm {} \;
looks for all files with "level" in their name (regardless what comes before or after) and deletes these files
Quote:
ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1
copies all files and folders in 0.org/ to the 0 directory of each processor directory. Why the $1 is added at this end is not clear to me.

This second command seems pretty odd to me. DecomposePar will add the processor boundary conditions to each of the variables when decomposing but this command will overwrite the files again with the original 'undecomposed' ones. I expect this to be the cause of the error you get.

Besides this, the order of commands in your script also seems a bit odd to me. This is the order I would follow:

1. set up basic mesh (e.g. with blockMesh)
2. if necessary, refine/adjust mesh (e.g. refineMesh, snappyHexMesh)
3. set initial fields (e.g. copy 0.orig fields to 0, setFields, ...)
4. decomposePar
5. run the simulation (e.g. foamJob -p LTSinterFoam)
6. reconstructPar
7. Postprocessing ...

The message is, you should not make to many manipulations between decomposePar, running the simulation and reconstructPar (I would recommend not to make any). Try to modify your script according to this order and let me know if it solved the problem.

Regards,

L
Lieven is offline   Reply With Quote

Old   November 18, 2012, 21:07
Default
  #5
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 15
laurent98 is on a distinguished road
hi;
first thanks you very much for answering, i just get the solver running!!! its very exciting!!!
in fact i saw that setFields is pretty smart: that set fields even when those are decomposed on multi processor!!!
and when i re-decompose, to run the solver, the repertories are re-write, so no need to delete them....
happy day to all LL
laurent98 is offline   Reply With Quote

Reply

Tags
allrun script, parallel computing, shm


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
Problem running LTSInterFoam timothee OpenFOAM Running, Solving & CFD 7 June 26, 2014 17:49
LTSInterFoam and pressure driven flow Andrea_85 OpenFOAM 3 August 21, 2012 09:44
LTSInterFoam fro OF1.6 shyam OpenFOAM Programming & Development 2 November 11, 2011 07:21
LTSInterFoam pere OpenFOAM Running, Solving & CFD 0 November 2, 2011 08:02
LTSinterfoam visualization pere OpenFOAM Post-Processing 4 October 14, 2011 16:25


All times are GMT -4. The time now is 09:16.