Skip to content
Snippets Groups Projects
Commit 91438856 authored by Alexander Jaust's avatar Alexander Jaust
Browse files

scripts for running tests

parent aa226c64
No related branches found
No related tags found
1 merge request!6Feature/ff pm coupling fvca cleanup (to be moved into dumux-pub/jaust2020a)
[Darcy.Grid]
UpperRight = 1 1
Cells = MESHSIZE MESHSIZE
[Stokes.Grid]
LowerLeft = 0 1
UpperRight = 1 2
Cells = MESHSIZE MESHSIZE
[Stokes.Problem]
Name = FLOWPROBLEMNAME
PressureDifference = PRESSUREDIFF
[Darcy.Problem]
Name = darcy
[Darcy.SpatialParams]
Permeability = PERM # m^2
AlphaBeaversJoseph = ALPHA
[Vtk]
OutputName = CASENAME
[Problem]
Name = "fvca-monolithic"
EnableGravity = false
EnableInertiaTerms = HASINERTIATERMS
[Vtk]
AddVelocity = 1
#! /usr/bin/env bash
#testcase="VerticalFlow"
pressureDifferences=("1e-9")
permeabilities=("1e-6")
alphaBeaversJoseph=("1.0")
meshSizes=("20" "40" "80")
hasInertiaTerms=("true" "false")
#interpolation=("nearest-neighbor" "nearest-projection")
i=0
#mkdir -p ${testcase}
#cd ${testcase}
solver="fvca-monolithic-reversed"
inputTemplate="fvca-monolithic-base.input"
#cp ../${geomtemplate} .
#configurations="configs-${testcase}.txt"
#echo "" > ${configurations}
basedir="${PWD}"
for hasInertiaTerms in "${hasInertiaTerms[@]}"; do
for dp in "${pressureDifferences[@]}"; do
for permeability in "${permeabilities[@]}"; do
for alpha in "${alphaBeaversJoseph[@]}"; do
for mesh in "${meshSizes[@]}"; do
i=$((i+1))
# Check if Stokes or Navier-Stokes
flowProblemName="stokes"
# echo ${hasInertiaTerms}
if [[ "${hasInertiaTerms}" == "true" ]]; then
flowProblemName="navier-stokes"
fi
# Generate name of test case and create directories
casename="${flowProblemName}-${mesh}-${alpha}-${permeability}-${dp}"
echo "${casename}"
mkdir -p "${casename}"
cd ${casename}
# ln -s "../${solver}" "${solver}"
cp "../${solver}" .
# Setting up input file
inputFile="${casename}.input"
sed -e s/MESHSIZE/"${mesh}"/g \
-e "s/FLOWPROBLEMNAME/${flowProblemName}/g" \
-e "s/PRESSUREDIFF/${dp}/g" \
-e "s/PERM/${permeability}/g" \
-e "s/ALPHA/${alpha}/g" \
-e "s/HASINERTIATERMS/${hasInertiaTerms}/g" \
-e "s/CASENAME/${casename}/g" \
"../${inputTemplate}" > ${inputFile}
# Running simulation
solverCmd="./${solver} ${inputFile}"
#echo "$solverCmd"
# $(${solverCmd} > solver.log)
$(time ./${solver} "${inputFile}" > solver.log)
# $(./${solverCmd} ${inputFile} > solver.log)
# Go back to root dir
cd "${basedir}"
done
done
done
done
done
echo "In total ${i} cases were run"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment