Skip to content
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

New RANS models #600

Open
wants to merge 55 commits into
base: next
Choose a base branch
from
Open

New RANS models #600

wants to merge 55 commits into from

Conversation

nandu90
Copy link

@nandu90 nandu90 commented Oct 23, 2024

The following RANS models are now available:

  • KTAU (standard) --> default model
  • SST (ktau SST model)
  • SST+DDES (ktau SST Delayed Detached Eddy Simulation)
  • SST+IDDES (ktau SST Improved Delayed Detached Eddy Simulation)

SST based models require ywd array. User has the option to pass it through RANS::setup. If not provided, the default is to use cheap_dist

The turbulent Prandtl number in ktauChannel case is changed to 0.85 (from 0.7)

  • CI setup of periodicHill case for DDES model(s)

MPI_Allreduce(MPI_IN_PLACE, &relen, 1, MPI_DFLOAT, MPI_MAX, platform->comm.mpiComm);

//https://turbmodels.larc.nasa.gov/Other_LES_Data/2Dhill_periodic/hill_LES_cf_digitized.dat
const auto lenLES = 4.69;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use CiEvalTest(). You'll find an example in ethier.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to CiEvalTest()

@@ -0,0 +1,16 @@
@kernel void scalarScaledAdd(const dlong N,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A kernel like this should be not needed. Use a linAlg function instead.

@@ -0,0 +1,61 @@
#include "intercept.oudf"

@kernel void tauWallKernel(const dlong Nelements,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this kernel needed? Can't we use the existing drag functio?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to extract tauwall pointwise GLL array along the wall to test it against LES data. The drag function returns integrated value.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI test for this case calculates the error norm of computed tau wall values against LES data (from NASA's website)

polynomialOrder = 7
#startFrom = r.fld

polynomialOrder = 3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add an example with such a low polynomial order. It's considered to be bad practice to use a polynomial order < 5.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed polynomial order to 5. It was a challenge to keep CI test under 3 minutes. I have reduced the mesh size significantly to keep computational cost minimum.

std::string model = "sst+des";
RANSktau::setup(scalarFieldStart,model,o_ywd);

/* if(ciMode) { */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code sections like this

//if(nrs->isCheckpointStep) tavg::outfld();

/* } */
//if(nrs->isCheckpointStep) nek::userchk();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code sections like this

auto o_avg = tavg::o_avg();
/* ciTestErrors(nrs, time, tstep, o_avg); */

//if(nrs->isCheckpointStep) tavg::outfld();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code sections like this

c-----------------------------------------------------------------------
subroutine usrdat() ! This routine to modify element vertices
C-----------------------------------------------------------------------
subroutine useric(ix,iy,iz,ieg) ! set up initial conditions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use UDF_Setup instead of useric

}

mut = rho * k * tau;
const dfloat stmagn = sqrt(2.0 * stmag2);//note: stmag2 is missing factor 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment is confusing

@stgeke
Copy link
Collaborator

stgeke commented Oct 23, 2024

PR doesn't compile with latest next.

@nandu90 nandu90 requested a review from stgeke October 25, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants