|
[Sponsors] |
Surface laser heat source applied to VOF models,two-phase interface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 21, 2023, 05:12 |
Surface laser heat source applied to VOF models,two-phase interface
|
#1 |
New Member
KaWen
Join Date: Jan 2023
Posts: 2
Rep Power: 0 |
I'm doing things about laser melting materials, and the models include the gas phase as well as the metal phase. The VOF, melting and solidification models were opened in the FLUENT software, and a surface heat source was used between the two phases, taking into account the shallow depth of the laser action.The model is shown in the figure.
1.According to the information in the forum, I tried writing UDFs, adding a surface heat source at the two-phase interface (z=0) and including a gradient that causes my heat source not to act on the gas phase , can I set the heat source to act only on the metallic phase, even though I have added the statement (z<=0&&C_VOF(c, sec_th)>0.05 && C_VOF(c, sec_th)<1), but it doesn't seem to work? 2.Whenever I calculate a certain time step, it always pops up: Divergence detected in AMG solver: temperature Divergence detected in AMG solver: temperature Error at host: floating point exception Any tips or ideas on how to use this in ANSYS Fluent are greatly appreciated, thank you very much! DEFINE_ADJUST(store_VOF_gradient, domain) { Thread *t; Thread *ppt; Thread **pt; cell_t c; int phase_domain_index = 1; Domain *pDomain = DOMAIN_SUB_DOMAIN(domain, phase_domain_index); Alloc_Storage_Vars(pDomain, SV_VOF_RG, SV_VOF_G, SV_NULL); Scalar_Reconstruction(pDomain, SV_VOF, -1, SV_VOF_RG, NULL); Scalar_Derivatives(pDomain, SV_VOF, -1, SV_VOF_G, SV_VOF_RG, Vof_Deriv_Accumulate); mp_thread_loop_c(t, domain, pt) { if (FLUID_THREAD_P(t)) { ppt = pt[phase_domain_index]; begin_c_loop(c, t) { C_UDMI(c, t, 0) = C_VOF_G(c, ppt)[0]; C_UDMI(c, t, 1) = C_VOF_G(c, ppt)[1]; C_UDMI(c, t, 2) = C_VOF_G(c, ppt)[2]; C_UDMI(c, t, 3) = sqrt(C_UDMI(c, t, 0)*C_UDMI(c, t, 0) + C_UDMI(c, t, 1)*C_UDMI(c, t, 1) + C_UDMI(c, t, 2)*C_UDMI(c, t, 2)); // magnitude of gradient of volume fraction C_UDMI(c, t, 4) = C_UDMI(c, t, 0) / C_UDMI(c, t, 3); // nx -> x gradient of volume fraction divided by magnitude of gradient of volume fraction C_UDMI(c, t, 5) = C_UDMI(c, t, 1) / C_UDMI(c, t, 3); // ny -> y gradient of volume fraction divided by magnitude of gradient of volume fraction C_UDMI(c, t, 6) = C_UDMI(c, t, 2) / C_UDMI(c, t, 3); // nz -> z gradient of volume fraction divided by magnitude of gradient of volume fraction } end_c_loop(c, t) } } Free_Storage_Vars(pDomain, SV_VOF_RG, SV_VOF_G, SV_NULL); } DEFINE_SOURCE(heat_source, c, t, dS, eqn) { Thread *pri_th; Thread *sec_th; real source; real xc[ND_ND], time; // Define face centroid vector, time time = RP_Get_Real("flow-time"); // Acquire time from Fluent solver C_CENTROID(xc, c, t); // Acquire the cell centroid location real T = C_T(c, t); pri_th = THREAD_SUB_THREAD(t, 0); sec_th = THREAD_SUB_THREAD(t, 1); real alpha = C_VOF(c, sec_th); // cell volume fraction real r = sqrt(pow(xc[0] + xx0 - v*time, 2.0) + pow(xc[1], 2.0)); if (z<=0&&C_VOF(c, sec_th)>0.05 && C_VOF(c, sec_th)<1) { if (C_T(c, t) < 3500) { source = (((2 * A*P) / (pi*R*R))*exp((-2 * (r*r)) / (R*R)))*C_UDMI(c, t, 3); dS[eqn] = 0.0; |
|
Tags |
fluent, laser heat source, two phase interface, vof |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using PengRobinsonGas EoS with sprayFoam | Jabo | OpenFOAM Running, Solving & CFD | 36 | July 16, 2024 04:52 |
[OpenFOAM.com] swak4foam compiling issues on a cluster | saj216 | OpenFOAM Installation | 5 | January 17, 2023 17:05 |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 17:18 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |