TAGGED: cfd-udf-fleunt, solar-load, solar-loading, solar-ray-tracing
-
-
October 8, 2024 at 1:39 pmkonstantinospolychronakis10Subscriber
Hi everyone,
I am trying to model a floating solar pv in fluent by using the Volume of Fluid method. I am using the solar ray tracing to add the solar irradiance from a specific location. The problem that i am facing is that i want to create a udf file that has as an input value the calculated solar irradiance from the solar caclulator and not a specific value that i could assume. Previously i created a udf file for the heat source by assuming a constant value for the solar irradiation and it was working very well. By searching the manuals of the software i found out that i can store the values ofÂ
- Direct Normal Solar Irradiation
- Diffuse Solar Irradiation - Vertical Surface
- Diffuse Solar Irradiation - Horizontal Surface
- Ground Reflected Solar Irradiation - Vertical Surface Â
In UDMI Storage. I can not find the command that calls the calculated values from the software to the udf file. I am sending you also my code. The reason that i want the specific values of solar irradiation is that after that i want to use the code for a transient simulation. If anybody can help me about this issue i will be very thankfull. Thank you very much.
Â
#include "udf.h"
/* Define solar irradiation parameters */
#define SOLAR_IRRADIANCE 800.0  /* Solar radiation in W/m² */
#define BASE_EFFICIENCY 0.18 Â Â /* Baseline efficiency of PV conversion *//* UDF to calculate heat generation considering temperature-dependent PV efficiency */
DEFINE_SOURCE(heat_source_solar, cell, thread, dS, eqn)
{
  real heat_source_value;
  real cell_volume;
  real cell_temperature;
  real efficiency;
  real absorptivity = 0.8;  /* Absorptivity assumed constant here */
  Â
  /* Get the cell temperature */
  cell_temperature = C_T(cell, thread);
  Â
  /* Define a temperature-dependent efficiency:Â
    Efficiency decreases as temperature increases */
  if (cell_temperature < 298.15)
    efficiency = BASE_EFFICIENCY;  /* Base efficiency */
  else
    efficiency = BASE_EFFICIENCY - 0.0004 * (cell_temperature - 298.15);  /* Linear decrease in efficiency */
  Â
  /* Ensure efficiency does not go below zero */
  if (efficiency < 0.0)Â
    efficiency = 0.0;
  Â
  /* Calculate the heat generation from absorbed solar radiation */
  cell_volume = C_VOLUME(cell, thread); /* Get the volume of the current cell */
  Â
  /* Fraction of absorbed radiation converted to heat:Â
    (1 - efficiency) * absorptivity * solar irradiance */
  heat_source_value = (1.0 - efficiency) * absorptivity * SOLAR_IRRADIANCE/0.0046;  /* Apply the source term to the energy equation */
  dS[eqn] = 0.0;  /* Derivative of source term with respect to temperature (optional) */
  return heat_source_value;  /* Return the heat source value */
} -
October 8, 2024 at 2:31 pmRobForum Moderator
What is the model for? For a floating array I'd not worry about the solar gain, and for a solar gain I'd not worry about it floating.Â
-
October 8, 2024 at 2:41 pmkonstantinospolychronakis10Subscriber
It is a flexible thin film floating solar panel
-
October 8, 2024 at 2:43 pmRobForum Moderator
OK, and what does the CFD model do?
-
October 8, 2024 at 3:03 pmkonstantinospolychronakis10Subscriber
I am trying to model the temperature and as a result the efficiency of the panel. I have the fluid domain and the solar panel in this my using mapped interfaces
-
October 8, 2024 at 3:14 pmRobForum Moderator
OK, so the free surface isn't really moving? So you don't really need to use the VOF model.Â
-
October 8, 2024 at 3:21 pmkonstantinospolychronakis10Subscriber
No the free surface is moving. I am trying to model the effect of wind and also the effect of waves
-
October 8, 2024 at 3:29 pmRobForum Moderator
OK, so you want VOF, solar gain and 6DOF in one model? Which will require coding for the solar load on water free surface and potentially for the 6DOF moving mesh part?Â
There are tutorials covering parts of this, but the solar gain on the water free surface isn't simple.Â
-
October 8, 2024 at 3:33 pmkonstantinospolychronakis10Subscriber
Exactly! At first i am not modelling the waves and i assume that the solid body of the is in a standard position. Also i am using a steady state simulation at first. As a first step i want to modify my code to read the irradiation from the solar calculator for a specific location.
-
October 8, 2024 at 3:37 pmRobForum Moderator
Will the irradiation change if the waves are small?Â
-
October 8, 2024 at 3:41 pmkonstantinospolychronakis10Subscriber
I am thinking that i can model the change of the incident angle of the solar fluxin the pv but i believe that is a step further that the stage that i am right now. Do you know how can i store the values of the solar load calculator?
-
October 8, 2024 at 3:50 pmRobForum Moderator
Â
It’s a heat flux that’s added to the walls. I’m not sure there’s a documentated storage macro, and the actual input comes from a bulk model from ASHRAE which is mentioned in the manual.Â
Â
-
October 8, 2024 at 3:57 pmkonstantinospolychronakis10Subscriber
Okay thank you for the guidance! So you believe that is better option to find the solar load datasheet and load it as a parameter set to my code instead of using a macro?
-
October 8, 2024 at 4:01 pmRobForum Moderator
Possibly. You need to weigh up all the models you're proposing and then review compute resource and time: this is not a simple project!Â
-
- You must be logged in to reply to this topic.
-
861
-
427
-
367
-
225
-
201
© 2024 Copyright ANSYS, Inc. All rights reserved.