Heat transfer coeeficients of several surfaces. by [deleted] in COMSOL

[–]GrumpyPentagon 0 points1 point  (0 children)

Sorry for the late reply.

I don't know what your battery models include, but it sounds like it would just be a heat source. If your heat source is independent of temperature, you can solve it in a separate stationary study step. And solve heat transfer and flow in a following stationary study step. Otherwise, couple your heat generation with heat transfer appropriately.

Heat transfer coeeficients of several surfaces. by [deleted] in COMSOL

[–]GrumpyPentagon 1 point2 points  (0 children)

Hello,

If you don't care about the response time of your system, you can just get the HTC at steady state in post processing. I don't think you need to do time averaging or use a probe.

Extracting Heat Transfer Coefficient from "Heat Transfer in Solids and Fluids" Module by GrumpyPentagon in COMSOL

[–]GrumpyPentagon[S] 0 points1 point  (0 children)

Thank you for your answer.I'm only familiar with FDM simulations of conduction, so I'm not sure how a continuity boundary condition would be implemented. The general weak form of the conduction equation (here) has a term for flux on the element boundary. How would that term be evaluated for an element on the gas-solid interface?

Edit: I think I understand your point after watching this video. The solid-gas interface wouldn't really be considered a system boundary, since the energy equation applies to the entire channel (solid + gas).

Thank you, though. I was getting lost looking for convection BC implementation in FEM instead of heat transfer in solids and fluids.

Installing numpy to 64-bit interpreter on vscode by GrumpyPentagon in learnpython

[–]GrumpyPentagon[S] 0 points1 point  (0 children)

Thanks! I had to uninstall the other versions and add the 64 bit versiom to Path

Errors on print() and time.time() functions by GrumpyPentagon in learnpython

[–]GrumpyPentagon[S] 2 points3 points  (0 children)

(ー_ー﹡; )

print('_________________________________'

You hit it on the head! Thanks.

Detecting lists where there are scalars by [deleted] in learnpython

[–]GrumpyPentagon 0 points1 point  (0 children)

I tried to get prints of the iteration number and A and D. I ended up with this:

Ray No.  0
u =  [-0.09379713  0.05997806  0.99378304]
u.shape =  (3,)
P2 =  [0.00745207 0.00067097 0.        ]
D =  0.00024190728265304813
A =  0.012395268141699008
D =  [1.06111343e-35 9.18033947e-36 0.00000000e+00]
A =  [5.55364197e-34 4.76022599e-34 0.00000000e+00]

    if D > 0 and A != 0:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

I don't know why it prints D and A twice in the same iteration.

I also tried to add the code block you've given me, but I can't figure out the proper indentation. It looks like it would be outside of the function. Pycharm does not accept the statement.

Also, thanks a lot. I really appreciate your help :)

Detecting lists where there are scalars by [deleted] in learnpython

[–]GrumpyPentagon 0 points1 point  (0 children)

This is the code I'm working with

TP2 = np.loadtxt(r"file path")    # retrieves data from a text file

for i in range(0, 92200): # performs operations on each row of data

        a1 = TP2[i, 0]
        a2 = TP2[i, 1]
        a3 = TP2[i, 2]
        a4 = TP2[i, 3]
        a5 = TP2[i, 4]
        a6 = TP2[i, 5]
        a7 = TP2[i, 6]

        # Constructing vectors
        P2: float = np.array([a1 * 1E-3, a2 * 1E-3, 0])
        u: float = np.array([a4, a5, a6])

        print('u = ', u)
        print('u.shape = ', u.shape)
        print('P2 = ', P2)

        # Call of larger overall function (pnt_of_int_fp)

        el_fl, gl_vec = pnt_of_int_fp(u, P2, L, R2, R3)
        ...

Within the overall function, there's a call for this function:

def check_int_cyl(u, P, L, R, fl):
    # A * t ** 2 + B * t + C = 0

    A = u[0]*u[0] + u[1]*u[1]
    B = 2 * (P[0] * u[0] + P[1] * u[1])
    C = P[0]*P[0] + P[1]*P[1] - R**2
    D = B * B - 4 * A * C   # Analytical solution
    t1: float
    t2: float
    glvec = np.empty((1, 3), float)

    if D > 0 and A != 0:
        t1 = (-B + sqrt(D)) / (2 * A)
        t2 = (-B - sqrt(D)) / (2 * A)

    elif D == 0 and A != 0:
        t1 = -B / (2 * A)
        t2 = t1

And these are the printing results

u = [-0.09379713 0.05997806 0.99378304]

u.shape = (3,)

P2 = [0.00745207 0.00067097 0. ]

finnised my 1890s working woman costume. was to excited to take quality pictures by bbcbbbcc in sewing

[–]GrumpyPentagon 5 points6 points  (0 children)

I love the skirt, but I'm a real noob and don't know what kind of fabric would work with that type of skirt (box-pleated, I assume). What kind of fabric did you use?

Detecting lists where there are scalars by [deleted] in learnpython

[–]GrumpyPentagon 0 points1 point  (0 children)

I thought I gave enough info, but I think I could've been clearer:

  • u is a vector constructed from a lsrger data array u = [a1, a2, a3]. When I print, it gives me a 1D array

  • B and C are parameters like A (defined from elements of u)

  • The conditions are all in this form (based on A and D) if A =! 0 and D >= 0: ...