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

[SOWFA] Allrun script problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2016, 13:30
Exclamation Allrun script problem
  #1
Member
 
Mohsen
Join Date: Oct 2012
Posts: 47
Rep Power: 13
mohsen.boojari is on a distinguished road
Hi

I have a test case and don't know how to run it. because it has another script file instead of Allrun. it has too many commands and I don't know which one should I execute First.
can anyone help me?

here is the script file :

Quote:
#!/bin/bash
#
# Instructions for new CyEnce Cluster users:
# To use this script:
# 1) Save this script as a file named myscript on share
# 2) On share, Issue
# qsub myscript to submit the job
# Use qstat -a to see job status,
# Use qdel jobname to delete one of your jobs
# jobnames are of the form 1234.share

###########################################
# Output goes to file BATCH_OUTPUT.
# Error output goes to file BATCH_ERRORS.
# If you want the output to go to another file, change BATCH_OUTPUT
# or BATCH_ERRORS in the following lines to the full path of that file.

#PBS -o BATCH_OUTPUT
#PBS -e BATCH_ERRORS

#PBS -lnodes=8pn=16:compute,walltime=30:00:00

# Change to directory from which qsub command was issued
cd $PBS_O_WORKDIR
#cd work/Run_SOWFA
source ~/.bashrc

# Run the solver up to 12000 s (parallel)
# Function for refining the mesh globally in parallel.
refineMeshByCellSet()
{
for i in `seq 1 $1`;
do
echo "LEVEL $i REFINEMENT"
echo " selecting cells to refine..."
topoSet > log.toposet.$i 2>&1

echo " refining cells..."
refineHexMesh -overwrite domain > log.refineHexMesh.$i 2>&1
shift
done
}

# Make the mesh using blockMesh (serial)
echo "BUILDING THE MESH WITH blockMesh..."
blockMesh > log.blockMesh 2>&1
cp system/controlDict.1 system/controlDict
# Get rid of any initial files and replace with 0.original files (serial)
rm -rf 0
cp -rf 0.original 0
# Refine the mesh and solution files (enter number of refinement levels) (parallel)
#refineMeshByCellSet 1
#initialize the solution files (parallel)
echo "INITIALIZING THE FLOW FIELD..."
#setFieldsABL > log.setFieldsABL 2>&1
echo "DECOMPOSING THE DOMAIN WITH decomposePar..."
setFieldsABL2 > log.setFieldsABL 2>&1
decomposePar -cellDist -force > log.decomposePar 2>&1
echo "RUNNING THE SOLVER, PART 1..."

#mpirun -np 128 ABLSolver -parallel > log.ABLPisoSolver.1 2>&1
# Run the solver starting at 12000 s up to 14000s, saving planes of inflow
# data on the south and west boundaries every time step to be used as
# boundary conditions for the wind plant case. (parallel)
echo "RUNNING THE SOLVER, PART 2..."
#cp system/controlDict.2 system/controlDict

mpirun -np 128 ABLSolver -parallel > log.ABLSolver 2>&1
cp system/controlDict.2 system/controlDict

mpirun -np 128 ABLSolver -parallel > log.ABLSolver 2>&1
mohsen.boojari is offline   Reply With Quote

Old   February 7, 2016, 20:20
Default
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hi Mohsen,

One question, why do you want to run manually your case? It seems to be a large case run in a cluster using 128 nodes run it with the script!

What the script does is
  • stuff related to distributed run in a cluster. I haven't ever run a case in a cluster, so I'm not aware of what is beeing done at this point...
  • to create the base mesh with blockMesh.
  • copy the content within controlDict.1 into controlDict in order to use the time control settings contained in it.
  • reset the boundary and initial conditions contained in the "0.original" directory.
  • refine the mesh by means of the use of the function "refineMeshByCellSet()" created previously (it won't be performed since it is commented).
  • set initial values for the fields selected within some set cells/faces through a dictionary.
  • decompose the case according to the specification written in its corresponding dictionary.
  • run the solver twice; the first run is developed using the information of controlDict.1 and the second one with the information contained in the controlDict.2 file.

Maybe what is causing your confusion are the first lines, if this is the case, I can't help you... However, each step is commented (#) so you can have an idea of what is going on...

Maybe you don't understand the function "refineMeshByCellSet()", if so, I can help you. First, you have to tell the function the level of refinement (1 in this case) in the call to the function. Then the function runs topoSet in order to create the cellSets to be refined, afterwards it is refined with refineHexMesh. It is done as many times as you specify in the call.

Having said that, I recommend you to just run the script and let it flow! Hope it helps.

Best regards,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Reply

Tags
allrun script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Split connectors at their intersection FOUAD12 Pointwise & Gridgen 3 October 8, 2018 10:42
Fluent Parallelization Problem After AC Power Dropped pawl Hardware 5 November 13, 2016 06:08
[ICEM] Tcl script problem : can't insert a list into a blocking command macfly ANSYS Meshing & Geometry 0 March 5, 2016 11:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
ICEM script problem Zbynek CFX 0 October 12, 2004 07:05


All times are GMT -4. The time now is 21:36.