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

Specification of wall function treatment per individual marker #435

Merged
merged 11 commits into from
Oct 18, 2017

Conversation

vdweide
Copy link
Contributor

@vdweide vdweide commented Sep 7, 2017

This PR implements the specification of a different wall function treatment per viscous wall marker. In the configuration file you do this as follows, where the default is NO_WALL_FUNCTION.

% Viscous wall markers for which wall functions must be applied. (NONE = no marker)
% Format: ( marker name, wall function type, ... )
MARKER_WALL_FUNCTIONS= ( airfoil, NO_WALL_FUNCTION )

You can determine the type of wall function treatment for a given marker by calling the function CConfig::GetWallFunction_Treatment. I put a dummy call in CNSSolver::BC_HeatFlux_Wall and CNSSolver::BC_Isothermal_Wall, as an example.

It is the intention that the branches feature_Wall_Functions and feature_hom_wallModel merge with this version and work out the actual implementation for the FV solver and DG-FEM solver, respectively.

Copy link
Member

@economon economon left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for laying this out, Edwin, and I think it is general enough for the future.

Before merging, @GomerOfDoom: could you please address your comments in #399 as it pertains to this PR, or provide a review?

@vdweide
Copy link
Contributor Author

vdweide commented Sep 13, 2017

Paul and I talked about this yesterday and it could be that additional input parameters are required for at least some of the wall models. Those can be added to the input data for the wall function markers. @GomerOfDoom, and others, could you specify what additional input data is needed for some of the wall models?

Edwin

@GomerOfDoom
Copy link
Contributor

Hi All,

We will at least need a way to specify wall model thickness (distance away from the wall at which we exchange information with the flow solver).

I think it would also be good to be able to specify the number of wall model points (for a 1-D model) between the exchange location and the wall, the stretching factor, near-wall thickness, etc.

-Paul

@talbring
Copy link
Member

Maybe it makes more sense to have this changes in a separate branch for now ? This way we avoid potential problems for others in case there are some modifications of this config option necessary during the final implementation of the wall functions.

@vdweide
Copy link
Contributor Author

vdweide commented Sep 14, 2017

Tim,

You're right. I thought it was an easy thing to do, such that both the FVM and DG-FEM solvers could use it. But it seems to be more complicated than I originally thought. So let's close this PR for now.

Edwin

@vdweide vdweide closed this Sep 14, 2017
@vdweide vdweide reopened this Oct 5, 2017
@vdweide
Copy link
Contributor Author

vdweide commented Oct 5, 2017

Added the possibility to add additional information for some of the wall models as requested by @GomerOfDoom. I hope this is general enough.

Copy link
Member

@economon economon left a comment

Choose a reason for hiding this comment

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

LGTM, other than a couple of comments about comments in the code :).

@@ -4726,12 +4726,12 @@ void COutput::SetConvHistory_Body(ofstream *ConvHist_file,
Total_IDC = solver_container[val_iZone][FinestMesh][FLOW_SOL]->GetTotal_IDC();
}

if (inv_design) {
/* if (inv_design) {
Copy link
Member

Choose a reason for hiding this comment

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

Everything looks good, other than a couple things that are commented, like this 'inv_design' section. Was this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because this variable is not used and leads to a compiler warning. This was merged in earlier, but apparently was reverted by another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove it, if you prefer.

@@ -8038,12 +8038,12 @@ void COutput::SpecialOutput_SpanLoad(CSolver *solver, CGeometry *geometry, CConf
if (iSection == 0) {
Dihedral_Leading = atan((Zcoord_LeadingEdge_ - Zcoord_LeadingEdge) / (Ycoord_LeadingEdge_ - Ycoord_LeadingEdge))*180/PI_NUMBER;
Dihedral_Trailing = atan((Zcoord_TrailingEdge_ - Zcoord_TrailingEdge) / (Ycoord_TrailingEdge_ - Ycoord_TrailingEdge))*180/PI_NUMBER;
Dihedral = 0.5*(Dihedral_Leading + Dihedral_Trailing);
// Dihedral = 0.5*(Dihedral_Leading + Dihedral_Trailing);
Copy link
Member

Choose a reason for hiding this comment

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

Comment intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here. This is to avoid a compiler warning, which was merged in earlier and reverted again. Again, it can be removed.

}
else {
Dihedral_Leading = atan((Zcoord_LeadingEdge - Zcoord_LeadingEdge_) / (Ycoord_LeadingEdge - Ycoord_LeadingEdge_))*180/PI_NUMBER;
Dihedral_Trailing = atan((Zcoord_TrailingEdge - Zcoord_TrailingEdge_) / (Ycoord_TrailingEdge - Ycoord_TrailingEdge_))*180/PI_NUMBER;
Dihedral = 0.5*(Dihedral_Leading + Dihedral_Trailing);
// Dihedral = 0.5*(Dihedral_Leading + Dihedral_Trailing);
Copy link
Member

Choose a reason for hiding this comment

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

Comment intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here. This is to avoid a compiler warning, which was merged in earlier and reverted again. Again, it can be removed.

Copy link
Member

Choose a reason for hiding this comment

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

Great. Can you please remove these extra commented lines to keep it clean? Then it's all good to merge.

@vdweide vdweide merged commit 88a3d4b into develop Oct 18, 2017
@vdweide vdweide deleted the feature_WF_Input branch October 18, 2017 09:10
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.

4 participants