Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noh test script fixes #318

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/GSPH/GSPHHydros.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ def MFV(dataBase,
xmin = (-1e100, -1e100, -1e100),
xmax = ( 1e100, 1e100, 1e100),
ASPH = False,
RZ = False):
RZ = False,
smoothingScaleMethod = None):

# for now we'll just piggy back off this enum
assert densityUpdate in (RigorousSumDensity,IntegrateDensity)
Expand All @@ -204,7 +205,7 @@ def MFV(dataBase,
nfluid = dataBase.numFluidNodeLists
nsolid = dataBase.numSolidNodeLists
if nsolid > 0 and nsolid != nfluid:
print("MFM Error: you have provided both solid and fluid NodeLists, which is currently not supported.")
print("MFV Error: you have provided both solid and fluid NodeLists, which is currently not supported.")
print(" If you want some fluids active, provide SolidNodeList without a strength option specfied,")
print(" which will result in fluid behaviour for those nodes.")
raise RuntimeError("Cannot mix solid and fluid NodeLists.")
Expand Down Expand Up @@ -236,13 +237,11 @@ def MFV(dataBase,
"nodeMotionType" : nodeMotionType,
"gradType" : gradientType,
"densityUpdate" : densityUpdate,
"HUpdate" : HUpdate,
"epsTensile" : epsTensile,
"nTensile" : nTensile,
"xmin" : eval("Vector%id(%g, %g, %g)" % xmin),
"xmax" : eval("Vector%id(%g, %g, %g)" % xmax)}

#print(nodeMotionType)
# Build and return the thing.
result = Constructor(**kwargs)

Expand All @@ -268,3 +267,7 @@ def AGSPH(*args, **kwargs):
def AMFM(*args, **kwargs):
kwargs.update({"ASPH" : True})
return MFM(*args, **kwargs)

def AMFV(*args, **kwargs):
kwargs.update({"ASPH" : True})
return MFV(*args, **kwargs)
16 changes: 13 additions & 3 deletions tests/functional/Hydro/Noh/Noh-cylindrical-2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,18 @@
#
# GSPH
#
#ATS:gsph0 = test( SELF, "--gsph True --nRadial 100 --cfl 0.25 --nPerh 4.01 --graphics False --restartStep 20 --clearDirectories True --steps 100", label="Noh cylindrical GSPH, nPerh=4.0", np=8, gsph=True)
#ATS:gsph1 = testif(gsph0, SELF, "--gsph True --nRadial 100 --cfl 0.25 --nPerh 4.01 --graphics False --restartStep 20 --clearDirectories False --steps 60 --restoreCycle 40 --checkRestart True", label="Noh cylindrical GSPH, nPerh=4.0, restart test", np=8, gsph=True)
#ATS:gsph0 = test( SELF, "--gsph True --nRadial 100 --cfl 0.25 --nPerh 2.51 --graphics False --restartStep 20 --clearDirectories True --steps 100", label="Noh cylindrical GSPH, nPerh=2.5", np=8, gsph=True)
#ATS:gsph1 = testif(gsph0, SELF, "--gsph True --nRadial 100 --cfl 0.25 --nPerh 2.51 --graphics False --restartStep 20 --clearDirectories False --steps 60 --restoreCycle 40 --checkRestart True", label="Noh cylindrical GSPH, nPerh=2.5, restart test", np=8, gsph=True)
#
# MFM
#
#ATS:mfm0 = test( SELF, "--mfm True --nRadial 100 --cfl 0.25 --nPerh 2.51 --graphics False --restartStep 20 --clearDirectories True --steps 100", label="Noh cylindrical MFM, nPerh=2.5", np=8, gsph=True)
#ATS:mfm1 = testif(gsph0, SELF, "--mfm True --nRadial 100 --cfl 0.25 --nPerh 2.51 --graphics False --restartStep 20 --clearDirectories False --steps 60 --restoreCycle 40 --checkRestart True", label="Noh cylindrical MFM, nPerh=2.5, restart test", np=8, gsph=True)
#
# MFV
#
#ATS:mfv0 = test( SELF, "--mfv True --nRadial 100 --cfl 0.25 --nPerh 2.51 --graphics False --restartStep 20 --clearDirectories True --steps 100", label="Noh cylindrical MFV, nPerh=2.5", np=8, gsph=True)
#ATS:mfv1 = testif(gsph0, SELF, "--mfv True --nRadial 100 --cfl 0.25 --nPerh 2.51 --graphics False --restartStep 20 --clearDirectories False --steps 60 --restoreCycle 40 --checkRestart True", label="Noh cylindrical MFV, nPerh=2.5, restart test", np=8, gsph=True)

#-------------------------------------------------------------------------------
# The Cylindrical Noh test case run in 2-D.
Expand Down Expand Up @@ -383,7 +393,7 @@
hydro = FSISPH(dataBase = db,
W = WT,
cfl = cfl,
interfaceMethod = HLLCModulus,
interfaceMethod = HLLCInterface,
sumDensityNodeLists=[nodes1],
densityStabilizationCoefficient = 0.1,
compatibleEnergyEvolution = compatibleEnergy,
Expand Down
3 changes: 1 addition & 2 deletions tests/functional/Hydro/Noh/Noh-spherical-3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,11 @@
elif crksph:
hydro = CRKSPH(dataBase = db,
W = WT,
order = correctionOrder,
filter = xfilter,
cfl = cfl,
compatibleEnergyEvolution = compatibleEnergy,
XSPH = XSPH,
correctionOrder = correctionOrder,
volumeType = volumeType,
densityUpdate = densityUpdate,
HUpdate = HUpdate,
ASPH = asph)
Expand Down