Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nek5000
giraffe
Commits
d8184540
Commit
d8184540
authored
Nov 01, 2016
by
Elia Merzari
Browse files
Fixed issues with Flux sign, error in .rea and other miscellanea - More testing needed
parent
072cbe6f
Changes
4
Hide whitespace changes
Inline
Side-by-side
examples/integration_example/coefficient_integration.i
View file @
d8184540
...
...
@@ -51,7 +51,7 @@
[
Kernels
]
[
.
/
HeatSource
]
type
=
HeatSource
function
=
'
1
00
.0
'
function
=
'
1.0
'
variable
=
temp
[
..
/
]
[
.
/
HeatDiff
]
...
...
@@ -89,18 +89,6 @@
[]
[
BCs
]
[
.
/
top
]
type
=
FunctionDirichletBC
variable
=
temp
boundary
=
'
top
'
function
=
bc_func
[
..
/
]
[
.
/
bottom
]
type
=
FunctionDirichletBC
variable
=
temp
boundary
=
'
bottom
'
function
=
bc_func
[
..
/
]
[
.
/
wall
]
type
=
FunctionDirichletBC
variable
=
temp
...
...
@@ -282,9 +270,9 @@
[
Executioner
]
type
=
Transient
scheme
=
'
Explicit-Euler
'
#
Others
available
:
backward
Euler
,
Crank-Nicholson
,
etc
.
dt
=
0.0
1
#
Initial
timestep
size
dt
=
0.0
01
#
Initial
timestep
size
start_time
=
0
#
Starting
time
num_steps
=
20
#
DIVERGES
AFTER
4
TIMESTEPS
num_steps
=
3900
#
Number
of
Steps
nl_rel_tol
=
1e-8
#
Nonlinear
relative
tolerance
l_tol
=
1e-6
#
Linear
tolerance
...
...
examples/integration_example/integration_example.rea
View file @
d8184540
...
...
@@ -13,20 +13,20 @@
0.00000 p009
200.000 p010 FINTIME
0.00000 p011 NSTEPS
-0.0
1
000 p012 DT
-0.00
1
00 p012 DT
0.00000 p013 IOCOMM
0.00000 p014 IOTIME
100
0
.0 p015 IOSTEP
100.0
p015 IOSTEP
0.00000 p016 PSSOLVER: 0=default
0.00000 p017
0.
25
0000
E-01
p018 GRID < 0 --> # cells on screen
-1
.00000 p019 INTYPE
12.
0000 p020 NORDER
0.0000
0
p018 GRID < 0 --> # cells on screen
0
.00000 p019 INTYPE
0.0
0000 p020 NORDER
1.00000E-06 p021 DIVERGENCE
1.00000E-08 p022 HELMHOLTZ
0.00000 p023 NPSCAL
0.
1
00000E-08 p024 TOLREL
0.
1
00000E-08 p025 TOLABS
0.00000E-08 p024 TOLREL
0.00000E-08 p025 TOLABS
2.00000 p026 COURANT/NTAU
2.00000 p027 TORDER
0.00000 p028 TORDER: mesh velocity (0: p28=p27)
...
...
@@ -36,9 +36,9 @@
0.00000 p032 #BCs in re2 file, if > 0
100.000 p033 : : : MXGEOM
100.000 p034 : : : MAXNEW
0.10000
0
E-03 p035 : : :
0.10000
0
E-03 p036 : : : XMAGNET
0.10000
0
E-01 p037 : : : NGRIDS
0.10000E-03 p035 : : :
0.10000E-03 p036 : : : XMAGNET
0.10000E-01 p037 : : : NGRIDS
0.00000 p038 : : : NORDER2
0.00000 p039 : : : NORDER3
0.00000 p040
...
...
@@ -94,7 +94,7 @@
0.00000 p090 : : :
0.00000 p091 : : :
0.00000 p092
20.0000 p093 Number of previous pressure solns saved
20.0000
0
p093 Number of previous pressure solns saved
5.00000 p094 start projecting velocity after p94 step
5.00000 p095 start projecting pressure after p95 step
0.00000 p096 : : : which saving algorithm 1 = disca
...
...
examples/integration_example/integration_example.usr
View file @
d8184540
...
...
@@ -69,6 +69,10 @@ c-----------------------------------------------------------------------
ifflow=.false.
if (istep.eq.0) then
call rzero(t,n1)
endif
sint1=0.0
sarea1=0.0
...
...
@@ -86,10 +90,29 @@ c-----------------------------------------------------------------------
call gop(sarea1,wtmp,'+ ',1)
temp_nek=sint1/sarea1
sint1=0.0
sarea1=0.0
do e=1,lelt
do f=1,6
call surface_int(sint,sarea,flux_recon,e,f)
if (cbc(f,e,1).eq.'W ') then
sint1=sint1+sint
sarea1=sarea1+sarea
endif
enddo
enddo
call gop(sint1,wtmp,'+ ',1)
call gop(sarea1,wtmp,'+ ',1)
flux_moose=sint1/sarea1
if (nid.eq.0) then
write(6,*)"*** Temperature: ",tmin," - ",tmax
write(6,*)"*** Average Temperature: ",temp_nek
write(6,*)"*** Average Temperature: ",temp_nek,coeff_tij(1,1)
write(6,*)"*** Average Flux: ",flux_moose,coeff_fij(1,1)
endif
c Will this be overwritten -----------------
...
...
@@ -218,6 +241,7 @@ C=======================================================================
call nek_comm_settings(isyc,itime)
call nek_comm_startstat()
istep = 0
icall = 1
endif
istep=istep+1
...
...
@@ -242,7 +266,7 @@ C=======================================================================
integer pstep
pstep=pstep+1
call heat(pstep)
c
call heat(pstep)
return
end
...
...
@@ -449,17 +473,24 @@ c-----------------------------------------------------------------------
common/expansion_fcoef/coeff_fij(nl_max,nf_max)
common/expansion_recon/flux_recon(lx1,ly1,lz1,lelt)
integer e,f
real*8 coeff_base
real*8 fmode(lx1,ly1,lz1,lelt)
ntot=nx1*ny1*nz1*nelt
c --------------------------------------
c The flux from MOOSE must have proper sign
c --------------------------------------
coeff_base=-1.0
c --------------------------------------
call rzero(flux_recon,ntot)
call rzero(fmode,ntot)
do i0=1,n_legendre
do j0=1,m_fourier
call rzero(fmode,ntot)
call nek_mode(fmode,i0,j0)
do i=1,ntot
flux_recon(i,1,1,1)= flux_recon(i,1,1,1)
&
+
fmode(i,1,1,1)*coeff_fij(i0,j0)
&
+ coeff_base*
fmode(i,1,1,1)*coeff_fij(i0,j0)
enddo
enddo
enddo
...
...
examples/integration_example/picard_sub_subcycling.i
View file @
d8184540
...
...
@@ -23,7 +23,7 @@
num_steps
=
20
[
.
/
TimeStepper
]
type
=
NekTimeStepper
dt
=
0.01
dt
=
0.
0
01
[
..
/
]
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment