JezSw / nekRS

our next generation fast and scalable CFD code
https://nek5000.mcs.anl.gov/
Other
0 stars 1 forks source link

Tutorial 4 - Overlapping Overset Grids #37

Open JezSw opened 3 weeks ago

JezSw commented 1 week ago

@yslan added as been helping @kzscisoft with general information

kzscisoft commented 1 day ago
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;
}
#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

[PROBLEMTYPE] equation = navierstokes

[VELOCITY] residualTol = 1e-8 density = 1 viscosity = -100

[MESH] file = "upper.re2"

- [ ] The `SIZE` file content has also been overlooked, need to verify this is correct.
- [x] Run using a sesssion file:

lower:1; upper:1;

```sh
$ nrsbmpi hillnn.sess 1
yslan commented 1 day ago
kzscisoft commented 1 day ago

@yslan I tried with 2 and it threw an error, only seems to run with 1