forked from Nek5000/nekRS
-
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 4 - Overlapping Overset Grids #37
Comments
@yslan added as been helping @kzscisoft with general information |
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]);
}
}
void userf(double time) {
const dfloat ffx{0.052};
// Get x component of non-linear momentum array
// using offset of 0
auto o_FUx = nrs->o_NLT + 0 * nrs->fieldOffset;
platform->linAlg->fill(nrs->meshV->Nlocal, ffx, o_FUx);
}
void UDF_Setup() {
nrs->userVelocitySource = &userf;
}
void UDF_Setup() {
// initial conditions
for(int i{0}; i < mesh -> Nlocal; ++i) {
nrs->U[i + 0 * nrs->fieldOffset] = 1.0;
nrs->U[i + 1 * nrs->fieldOffset] = 0.0;
nrs->U[i + 2 * nrs->fieldOffset] = 0.0;
}
#ifdef __okl__
void codedFixedValueVelocity(bcData *bc) {
if(bc->id == 3) {
bc->u = bc->uinterp;
bc->v = bc->vinterp;
bc->w = bc->winterp;
} else {
bc->u = 0.0;
bc->v = 0.0;
bc->w = 0.0;
}
}
#endif
[GENERAL]
polynomialOrder = 7
stopAt = endTime
endTime = 200
variableDT = yes
dt = targetCFL = 0.4 + initial=1e-1
timeStepper = bdf2
checkpointControl = steps
checkpointInterval = 20
udf = "hillnn.udf"
[PROBLEMTYPE]
equation = navierstokes
[VELOCITY]
residualTol = 1e-8
density = 1
viscosity = -100
[NEKNEK]
boundaryEXTOrder = 2
[MESH]
file = "upper.re2"
$ nrsbmpi hillnn.sess 1 |
|
@yslan I tried with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: