Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding heat transfer solve and velocity profile inputs #73

Open
wants to merge 147 commits into
base: sync
Choose a base branch
from

Conversation

brookeslawski
Copy link
Collaborator

@brookeslawski brookeslawski commented Nov 12, 2024

What

  1. Added the ability to simulate convective heat transfer from the heated ground surface and heated panels to the fluid. input/heated_panels2d.yaml runs on the HPC and input/test_heatedpanels2d.yaml runs locally.
  2. Added the ability to specify a velocity profile in input file.

Why

This feature enables the study of thermal effects of the presence of PV panels, such as how panels heat the surrounding air and how ground temperature (via atmospheric stability) affects the flow through a solar farm. This is the first step to studying the effect of the flow in a solar farm on convective cooling of a PV panel.

Code Changes

For task 1 (heat transfer solve):

  • Used panels2d as the baseline example and adapted it to include temperature via heated panels
  • Used upstream/sync as base branch for the code changes
  • Added the advection-diffusion equation as the fourth solve
  • Added a buoyancy term to the momentum equation (first solve)
  • Added temperature boundary conditions and initial conditions
  • In certain cases, the flow explodes in the lower corner of the outflow plane. This PR includes code changes that add a longer exit region (longer domain) and coarsen the mesh in this exit region, which solves most of the cases, but not all. (To be addressed by Issue Simulations explode at the outflow when thermal_analysis is on  #76)

For task 2 (velocity profile input):

  • Removed the dependency of inflow type on the geometry module selected and instead allows the user to specify the desired inflow conditions at the inlet (x=0 plane) and everywhere in domain (not just at x=0 plane)
  • edited tests to include new inputs

While implementing these changes, also fixed pre-existing bugs:

  • Replaced geom_dim with ndim to fix 2d/3d issues and added special treatment for ndim==2 versus nimd==3 where necessary (which explains the changes to the structure files)
  • Enabled multi-row simulation in panels2d module

Remaining Open Tasks

  • run with multiple rows
  • run on kestrel
  • subtract mesh_vel from velocity in temperature solve? and in residual?

Git issues have been opened to:

Related Issues and PRs

  1. Related to Issue Rayleigh-Benard equation #46 , which adds the advection diffusion equation, however, this PR applies the change to the simulation of a heated panel with heated ground, not to Raleigh-Benard flow, which is less relevant to our common application of PVade.
  2. Addresses Issue Adding ability to specify the inflow velocity profile type #59

This PR includes the changes from PR #60, which will be closed without merging.
This PR supersedes PR #52, which will be closed without merging.

aps_smag_u1_T320_a30 0461

brookeslawski and others added 26 commits June 6, 2024 10:06
@brookeslawski brookeslawski changed the base branch from dev to sync November 12, 2024 16:53
@brookeslawski brookeslawski changed the title Adding air temperature to PVade via heated panels example Adding heat transfer solve and velocity profile inputs Dec 11, 2024
@brookeslawski
Copy link
Collaborator Author

I merged in my changes from PR #60, which was created from dev, not sync, so I'm worried that those changes may have reverted some recent ones from sync. @arswalid could you take a look?

@brookeslawski
Copy link
Collaborator Author

brookeslawski commented Dec 13, 2024

test_solve.py not working because flag2d.yaml creating empty outputs (shown below). This file runs without errors using the mpirun command, but not using pytest
Screenshot 2024-12-13 at 4 38 46 PM

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants