Fluids

Fluids

Example for DEFINE_UDS_FLUX leads to wrong results for velocity = 0

    • schwaral
      Subscriber
      Hi all,nnInstead of using the default flux term I want to use my own flux term now. I want to modify the velocity later and so on...Now I started testing the DEFINE_UDS_FLUX example and I noticed, that for velocity =0 (at the beginning of my Inlet-Velocity-Signal) the example leads to wrong results.nnI use a simple 1D case with 10 cells. left-side is UDS-Inlet with UDS-specified-Value=0.02939, right side is UDS-Outlet with Flux=0. in The middle of Domain I have 2 Cells with a source for UDS. I notice weird behavior on the left side at Inlet for velocity in my domain =0. The UDS Value is becoming too large then. I do not know how to avoid this, but I cannot negelect this behavior. Where is the difference to the default Code?n
    • Rob
      Ansys Employee
      Replot with node values off & post the image. n
    • schwaral
      Subscriber
      This is with the DEFINE_UDS_FLUX from example:nnnThis is with default mass-flow-rate: nnThis difference is not visible, when I run the case with a constant velocity (for example 5m/s). Like I said I have a velocity-function that determines the uniform velocity-flow field, which is 0 fot t=0. 2nd picture shows a behavior that is expected. Pictures are taken after 10 timesteps (dt=0.01). After 1st timestep the difference is even larger or in other words the UDS at Inlet (left side) is even more over my Inlet-Value of 0.02939. In both cases convergency is reached.nPS: Plots after 1st timestep suggest, that the callculated value in the first cell next to the inlet is to high and then this value is transported with the flow towards the right. Why could be the calculated value so different. In first cell the value should be the value I use at boundary condition.n
    • schwaral
      Subscriber
      here is again a plot after 1st timestep with the UDF example (node value plottet)nnand with the default flux term (node values): this is how it should look like. Top and bottom is symmetry but like I said I patch a uniform velocity field function and during first timestep it is 0. I do not solve the flow field, I solve only UDS.nn
    • schwaral
      Subscriber
      This is what the console shows me for the flux. You can see in the code above, when I print the value. nn
    • DrAmine
      Ansys Employee
      If you return F_Flux what does it happen?n
    • schwaral
      Subscriber
      You are saying I should use it instead of my whole Code? That seems to work fine.DEFINE_UDS_FLUX(my_uds2_flux, f, t, i) //RETURNS MASS FLOW RATE THROUGH A GIVEN FACES n{ntreturn F_FLUX(f, t);n}n
    • DrAmine
      Ansys Employee
      Because it is divergence free which is a requirement.n
    • schwaral
      Subscriber
      Sorry I did not understand. Can I use now the return F_Flux to adjust the Flux? Or How does this information help me now? At the end I only want to modify the velocity and density, which is not a problem but first I think the example from the user guide should work. And the example is not working at the moment :/ n
    • schwaral
      Subscriber
      In case you were trying to say I should only replace flux by F_FLUX(f, t) in the example from USerGuide this did not help. n
    • schwaral
      Subscriber
      I am wondering if the UDF for UDS_FLUX is not working because I have a 1D case. In 3D it seems to just finen
    • DrAmine
      Ansys Employee
      I have just asked to use F_FLUX to check if it works or not: I did not ask for anything else. You wrote that it worked. This makes me feel that in 3D the detailed example in the manual is not behaving as it should.n
Viewing 11 reply threads
  • You must be logged in to reply to this topic.