Why can't MECWAY write *FILM lines in a CCX input file?

MECWAY blanks out convection BC when you choose CCX solver.  Why?  MECWAY write the Surface into CCX but CCX doesn't do anything with it.

I'm no programmer, but even I can copy the named surface lines from the CCX input file into EXCEL and extract the element and face id and write the *Film or *Radiate command line in VBA.  Then copy and paste the *FILM column back into the CCX input. This seems pretty easy to do in MECWAY.  


*SURFACE,NAME=Top_of_Ceramic F or R F *FILM
19220,S2 Temp 1100 19220,F2,1100,100
19222,S2 HTC 100 19222,F2,1100,100
19224,S2 19224,F2,1100,100
19226,S2 19226,F2,1100,100
19228,S2 19228,F2,1100,100
19230,S2 19230,F2,1100,100
19232,S2 19232,F2,1100,100


Sub CommandButton1_Click()
'Routine to read surface from Calculix Input file and write Convection or Radiation command lines

Dim Surface, Temp, Coeff As String

Film = Cells(1, 4)
Temp = Cells(2, 4)
Coeff = Cells(3, 4)

If Film = "F" Then
    Cells(1, 5) = "*FILM"
End If

If Film = "R" Then
    Cells(1, 5) = "*RADIATE"
End If

i = 1

Do
    Surface = Cells(i + 1, 1)
    Space1 = InStr(1, Surface, ",")
    Elem = Left(Surface, Space1)
    Face = Mid(Surface, Space1 + 2, Space1 + 2)

    If Surface <> "" Then
        Cells(i + 1, 5) = Elem & Film & Face & "," & Temp & "," & Coeff
    End If

    i = i + 1

Loop While Surface <> ""

End Sub

Comments

  • Yes, that's a missing feature of Mecway 6 sorry. However, version 7 which is now in beta does write *FILM for convection but not *RADIATE. Thanks for posting the Excel VBA code to generate them.



  • Victor

    Thanks for including *Film in the new version.  Also, is there a limit to the number of lines you can write on the CCX step window?  For big models it truncates the copy.

    Paul
  • Oh, yes there is sorry. 32767 characters in version 6. I've removed this limit for the next release of version 7.

  • Thank You.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!