Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4f1fa8c
update paper
carlodev Feb 26, 2025
595122e
Merge branch 'JossPaper' of https://github.com/carlodev/SegregatedVMS…
carlodev Feb 26, 2025
c4803b6
Merge pull request #32 from carlodev/master
carlodev Feb 27, 2025
63cf090
typos and language error fix
carlodev Apr 28, 2025
46cd5bc
Merge branch 'JossPaper' of https://github.com/carlodev/SegregatedVMS…
carlodev Apr 28, 2025
7d77cf8
joss paper accepted
carlodev May 5, 2025
19140f0
Fix LaTeX math expression for JATS compatibility (replace \dfrac with…
carlodev May 19, 2025
a5f04b4
Updates JOSS paper
kyleniemeyer May 23, 2025
0205e69
Updates JOSS references
kyleniemeyer May 23, 2025
cdecabc
Merge pull request #33 from kyleniemeyer/patch-1
carlodev May 23, 2025
126daf5
cite pkg articles
carlodev May 23, 2025
4d64a89
err fix
carlodev May 23, 2025
9edc555
add papers references
carlodev May 23, 2025
1458b29
2025
carlodev May 23, 2025
3242198
s
carlodev May 23, 2025
51b2072
s
carlodev May 23, 2025
190a045
s
carlodev May 23, 2025
68f0007
s
carlodev May 23, 2025
6bac6ea
s
carlodev May 23, 2025
b9e31fe
s
carlodev May 23, 2025
5418c66
rm AirfoilGmsh
carlodev Jun 2, 2025
e4cb2ee
update MatrixCreation to new APIs version Gridap
carlodev Jun 4, 2025
640a8f4
updt project
carlodev Jun 4, 2025
36edd77
updt compat
carlodev Jun 10, 2025
3fb2f83
bug fix
carlodev Sep 4, 2025
fe7ae3b
update_matrix_vector!
carlodev Sep 5, 2025
d1a578f
restart from 3D solution
carlodev Oct 16, 2025
590c1ea
fix precompilation
carlodev Oct 17, 2025
0839b22
updt compat
carlodev Oct 17, 2025
e7428a2
normalization tgv error with anlytical
carlodev Oct 20, 2025
19c8fa4
bug fix
carlodev Oct 20, 2025
11442e0
revert uh ph to normalize error
carlodev Oct 20, 2025
1958990
tgv 2D error absolute and relative
carlodev Oct 22, 2025
5b55339
tgv2d error update
carlodev Oct 22, 2025
62f4c2c
PartitionedArrays = "=0.3.5"
carlodev Oct 22, 2025
aa74975
abs errors tgv
carlodev Oct 22, 2025
42bae00
export Tm and Tc
carlodev Oct 23, 2025
b34f9f6
tau_m vms computation options
carlodev Oct 27, 2025
93bc63e
Revert "tau_m vms computation options"
carlodev Oct 29, 2025
92802a6
bug fix
carlodev Oct 29, 2025
4dbbf78
Update Project.toml for Julia 1.12 compatibility
barche Dec 9, 2025
a9a2ed5
Merge pull request #35 from barche/Update-deps
carlodev Dec 15, 2025
83eb21f
first commit
carlodev Mar 20, 2026
34e7de0
run(`nvidia-smi`) if cuda type
carlodev May 4, 2026
d307b11
custom limiter dt
carlodev May 7, 2026
8c95a89
rm print stabilization dt
carlodev May 7, 2026
e10c95c
in place rhs compute
carlodev May 18, 2026
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
1,615 changes: 1,615 additions & 0 deletions Manifest.toml

Large diffs are not rendered by default.

42 changes: 22 additions & 20 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SegregatedVMSSolver"
uuid = "90220dfc-fac3-4908-b895-51c1a1f4cb85"
authors = ["Carlo Brunelli"]
version = "3.0.0"
version = "3.0.1"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down Expand Up @@ -32,27 +32,29 @@ Trapz = "592b5752-818d-11e9-1e9a-2b8ca4a44cd1"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"

[compat]
CSV = "0.10.15"
DataFrames = "1.7.0"
DataInterpolations = "6.6.0"
DelimitedFiles = "1.9.1"
FFTW = "1.8.0"
FileIO = "1.16.6"
FillArrays ="=1.13.0"
Gridap = "=0.17.20"
GridapDistributed = "=0.3.2"
GridapGmsh = "=0.7.1"
CSV = "=0.10.15"
DataFrames = "=1.7.0"
DataInterpolations = "=8.0.1"
DelimitedFiles = "=1.9.1"
FFTW = "=1.9.0"
FileIO = "=1.17.0"
FillArrays = "=1.13.0"
Gridap = "=0.18.12"
GridapDistributed = "=0.4.7"
GridapGmsh = "=0.7.2"
GridapPETSc = "=0.5.3"
MPI ="=0.20.22"
NearestNeighbors ="0.4.21"
Parameters = "0.12.3"
PartitionedArrays ="=0.3.4"
Revise ="3.7.1"
ScatteredInterpolation = "0.3.6"
LinearAlgebra = "1.11.0"
MPI = "=0.20.22"
NearestNeighbors = "=0.4.21"
Parameters = "=0.12.3"
PartitionedArrays = "=0.3.5"
Pkg = "1.11.0"
Random = "1.11.0"
Revise = "=3.8.0"
ScatteredInterpolation = "=0.3.6"
SparseArrays = "1.11.0"
Statistics = "1.11.1"
SyntheticEddyMethod = "=0.4.4"
Trapz ="2.0.3"
Test = "1.11.0"
UnPack = "1.0.2"
julia = "1.11.1"
Trapz = "=2.0.3"
UnPack = "=1.0.2"
61 changes: 61 additions & 0 deletions TGV2D.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using PartitionedArrays
using SegregatedVMSSolver
using SegregatedVMSSolver.ParametersDef
using SegregatedVMSSolver.SolverOptions
using MPI





t0 = 0.0
dt = 0.01
tF = 10*dt
vortex_diameter = 1.0
N = 16
Re = 1600
D = 2

backend = with_debug

rank_partition = (2,2)





# solver_options = petsc_options(; vel_ksp="gmres", vel_pc="gamg", pres_ksp="cg", pres_pc="gamg")
solver_options = " -vel_ksp_type gmres -vel_pc_type gamg -vel_ksp_rtol 1.e-10 -vel_ksp_converged_reason \
-pres_ksp_type cg -pres_pc_type gamg -pres_ksp_rtol 1.e-6 -pres_ksp_converged_reason \
-ksp_atol 0.0 -vec_type cuda -mat_type aijcusparse -log_view"
sprob = StabilizedProblem(VMS(3))
timep = TimeParameters(t0=t0, dt=dt, tF=tF)

physicalp = PhysicalParameters(Re=Re, c=vortex_diameter)
solverp = SolverParameters(matrix_freq_update=1, Number_Skip_Expansion=10e6, M=40,
petsc_options=solver_options)
exportp = ExportParameters(printinitial=true, printmodel=true,
vtu_export = ["uh","ph","uh_analytic", "ph_analytic"], extra_export=["VelocityError","PressureError"])




meshp = MeshParameters(rank_partition, D; N=N, L=0.5 * vortex_diameter)
simparams = SimulationParameters(timep, physicalp, solverp, exportp)
bc_tgv = Periodic(meshp, physicalp)



mcase = TaylorGreen(bc_tgv, meshp, simparams, sprob)



# Create folder and file
# mkdir("Log")
# open("Log/PrintSim.txt", "w") do file
# end



SegregatedVMSSolver.solve(mcase, backend)

82 changes: 82 additions & 0 deletions TGV2D_limiter.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using PartitionedArrays
using SegregatedVMSSolver
using SegregatedVMSSolver.ParametersDef
using SegregatedVMSSolver.SolverOptions
using MPI
using Gridap



N = 128
dt = 0.025

order = 2
t0 =0.0
vortex_diameter = 1.0
L = 0.5 * vortex_diameter

u_conv = 0.2
Re = 1_000

D = 2

CFL_eff = u_conv*N * dt * order / (2*L)

backend = with_debug

rank_partition = (4,4)
tF = 0.1 #dt*10


println("------------------------")
println("CFL = $(CFL_eff)")
println("------------------------")

function petsc_options_cstm()
return " -vel_ksp_type gmres -vel_pc_type gamg -vel_ksp_rtol 1.e-8 -vel_ksp_converged_reason \
-pres_ksp_type cg -pres_pc_type gamg -pres_ksp_rtol 1.e-8 -pres_ksp_converged_reason"
end


my_lim = CustomLimiter() do dt, uun, G, GG, ν
h = L /(order*N)
dt_eff = h/u_conv
return max(dt_eff,dt)

end



sprob = StabilizedProblem(VMS(order), TensorFormulation(dt_limiter = my_lim), false)




# sprob = StabilizedProblem(method=VMS(order), coeff_method=TensorFormulation(r=2, Ci=[4, 36]), skew=false)
timep = TimeParameters(t0=t0,dt=dt,tF=tF)

physicalp = PhysicalParameters(Re=Re,c=vortex_diameter, u_in_mag=u_conv)

solverp = SolverParameters(matrix_freq_update = 1, Number_Skip_Expansion=10e6, M = 40, a_err_threshold=10_000,
petsc_options = petsc_options_cstm())
exportp = ExportParameters(printinitial=true,printmodel=true, extra_export=["VelocityError","PressureError"])


meshp= MeshParameters(rank_partition,D;N=N,L=L)


simparams = SimulationParameters(timep,physicalp,solverp,exportp)

params_tvg = TaylorGreenParameters(Vs=u_conv, Ua=0.3*u_conv, Va = 0.2*u_conv)
bc_tgv = Periodic(meshp,physicalp,params_tvg )



mcase = TaylorGreen(bc_tgv, meshp,simparams,sprob)


SegregatedVMSSolver.solve(mcase,backend)




79 changes: 71 additions & 8 deletions paper/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ @article{Badia:2020
number = {52},
pages = {2520},
author = {Santiago Badia and Francesc Verdugo},
title = {Gridap: An extensible Finite Element toolbox in Julia},
title = {Gridap: An extensible Finite Element toolbox in {J}ulia},
journal = {Journal of Open Source Software}
}

Expand All @@ -20,7 +20,7 @@ @article{Verdugo:2022
volume = {276},
pages = {108341},
author = {Francesc Verdugo and Santiago Badia},
title = {The software design of Gridap: A Finite Element package based on the Julia {JIT} compiler},
title = {The software design of {Gridap}: A Finite Element package based on the {J}ulia {JIT} compiler},
journal = {Computer Physics Communications}
}

Expand All @@ -33,7 +33,7 @@ @article{BadiaD:2022
number = {74},
pages = {4157},
author = {Santiago Badia and Alberto F. Martín and Francesc Verdugo},
title = {GridapDistributed: a massively parallel finite element toolbox in Julia},
title = {GridapDistributed: a massively parallel finite element toolbox in {J}ulia},
journal = {Journal of Open Source Software}
}

Expand Down Expand Up @@ -72,14 +72,77 @@ @article{Hughes:2000
doi = {10.1007/s007910050051},
}

@article{Banyai:2016,
@phdthesis{Banyai:2016,
author = {Tamas Banyai},
isbn = {9782875161093},
institution = {Université Libre de Bruxelles},
title = {Development of Stabilized Finite Element Method for Numerical Simulation of Turbulent Incompressible Single and Eulerian-Eulerian Two-Phase Flows},
school = {Université Libre de Bruxelles, Ecole polytechnique de Bruxelles},
address = {Bruxelles},
title = {Development of Stabilized Finite Element Method for Numerical Simulation of Turbulent Incompressible Single and {E}ulerian-{E}ulerian Two-Phase Flows},
year = {2016},
type = {PhD thesis},
month = aug,
url = {http://hdl.handle.net/2013/ULB-DIPOT:oai:dipot.ulb.ac.be:2013/235110}
}


@article{botella_peyret:1998,
title={Benchmark spectral results on the lid-driven cavity flow}, volume={27}, DOI={10.1016/s0045-7930(98)00002-4}, number={4}, journal={Computers and Fluids}, author={Botella, O. and Peyret, R.}, year={1998}, pages={421–433}}
@article{botella_peyret:1998,
title={Benchmark spectral results on the lid-driven cavity flow},
volume={27},
DOI={10.1016/s0045-7930(98)00002-4},
number={4},
journal={Computers and Fluids},
author={Botella, O. and Peyret, R.},
year={1998},
pages={421–433}
}



@misc{Trixi:2025,
title={{T}rixi.jl: {A}daptive high-order numerical simulations
of hyperbolic {PDE}s in {J}ulia},
author={Schlottke-Lakemper, Michael and Gassner, Gregor J and
Ranocha, Hendrik and Winters, Andrew R and Chan, Jesse
and Rueda-Ramírez, Andrés},
year={2025},
howpublished={\url{https://github.com/trixi-framework/Trixi.jl}},
doi={10.5281/zenodo.3996439}
}



@misc{WaterLily:2024,
title={WaterLily.jl: A differentiable and backend-agnostic Julia solver to simulate incompressible viscous flow and dynamic bodies},
author={Gabriel D. Weymouth and Bernat Font},
year={2024},
eprint={2407.16032},
archivePrefix={arXiv},
primaryClass={physics.flu-dyn},
url={https://arxiv.org/abs/2407.16032},
}


@article{Oceananigans:2020,
doi = {10.21105/joss.02018}, url = {https://doi.org/10.21105/joss.02018}, year = {2020}, publisher = {The Open Journal}, volume = {5}, number = {53}, pages = {2018}, author = {Ali Ramadhan and Gregory LeClaire Wagner and Chris Hill and Jean-Michel Campin and Valentin Churavy and Tim Besard and Andre Souza and Alan Edelman and Raffaele Ferrari and John Marshall}, title = {Oceananigans.jl: Fast and friendly geophysical fluid dynamics on GPUs}, journal = {Journal of Open Source Software} }



@misc{Verdugo:2025,
author = {Francesc Verdugo and Alberto F. Martin and HRvanElderen and GeliezaK and Jordi Manyer Fuertes and Fredrik Ekre and Joroks and Dennis Ogiermann and Yung-sheng Tu and Hendrik Ranocha and Oriol Colomés and Mosè Giordano and Oscar Smith and Robin Richardson},
title = {PartitionedArrays.jl: PartitionedArrays-v0.5.10},
year = 2025,
publisher = {Zenodo},
version = {v0.5.10},
doi = {10.5281/zenodo.15266760},
url = {https://github.com/PartitionedArrays/PartitionedArrays.jl}
}

@misc{GridapPETSc:2025,
author = {Francesc Verdugo and Santiago Badia and Alberto F. Martin and Jordi Manyer Fuertes and Eric Neiva and the Gridap Team},
title = {GridapPETSc.jl: A PETSc backend for Gridap.jl},
year = {2025},
howpublished = {\url{https://github.com/gridap/GridapPETSc.jl}},
}

@misc{@BrunelliGmsh:2025,
author = {Carlo Brunelli}, title={AirfoilGmsh.jl: A Julia packgage for generating airfoil meshes using Gmsh}, year={2025}, howpublished={\url{https://github.com/carlodev/AirfoilGmsh.jl}}}
Loading
Loading