-
Notifications
You must be signed in to change notification settings - Fork 1
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
Tutorial 2 - Periodic Hill #35
Comments
In order to get the example to run in Nekrs I had to make the following modifications to the [GENERAL]
+ polynomialOrder = 7
stopAt = endTime
endTime = 200
variableDT = yes
- targetCFL = 0.4
+ dt = targetCFL = 0.4 + initial=1e-1
- writeControl = runTime
+ checkpointControl = steps
- writeInterval = 20
+ checkpointInterval = 20
- constFlowRate = X
- meanVelocity = 1.0
+ constFlowRate = meanVelocity=1.0 + direction=X
[PROBLEMTYPE]
- equation = incompNS
+ equation = navierstokes
- [PRESSURE]
- residualTol = 1e-5
- residualProj = yes
[VELOCITY]
residualTol = 1e-8
density = 1
viscosity = -100 For quick runs during testing I temporarily set Manually set initial Note also removal of Pressure block due to there being no
|
Mapping of variable mesh from Fortran to UDF file: subroutine usrdat2()
implicit none
include 'SIZE'
include 'TOTAL'
integer ntot,i
real A,B,C,xx,yy,argx,A1
ntot = lx1*ly1*lz1*nelt
A = 4.5
B = 3.5
C = 1./6
do i=1,ntot
xx = xm1(i,1,1,1)
yy = ym1(i,1,1,1)
argx = B*(abs(xx-A)-B)
A1 = C + C*tanh(argx)
ym1(i,1,1,1) = yy + (3-yy)*A1
enddo
return
end void UDF_Setup() {
auto mesh = nrs->meshV;
const dfloat A{4.5}, B{3.5}, C{1./6};
// mesh modification
for(int i{0}; i < mesh -> Nlocal; ++i) {
const dfloat argx{B * (std::abs(mesh->x[i] - A) - B)};
const dfloat A1{C * (1. + std::tanh(argx))};
mesh->y[i] = mesh->y[i] + A1 * (3. - mesh->y[i]);
}
} |
Boundary conditions mapping from Fortran to UDF: subroutine useric(ix,iy,iz,ieg)
implicit none
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
integer ix,iy,iz,ieg
ux = 1.0
uy = 0.0
uz = 0.0
temp = 0.0
return
end #ifdef __okl__
void velocityDirichletConditions(bcData* bc) {
bc->u = 1.0;
bc->v = 0.0;
bc->w = 0.0;
bc->s = 0.0;
}
#endif |
Need to mention that void UDF_ExecuteStep(double time, int tstep) {} |
No description provided.
The text was updated successfully, but these errors were encountered: