# Thermal Flux BC

I'm trying to simulate laser generation of ultrasound using a thermal flux boundary condition to model the laser excitation. I set this condition by looping over the elements on one surface and applying a flux boundary condition to each element individually (boun defn and node applied between nodes ii and ii+1). Each element is scaled independently according to a data hist input to approximate a Gaussian spatial profile for the beam. I also set the far x boundary to a fixed reference temperature (to avoid any issues if the thermal solver uses an implicit solve). The relevant code is copied below.

The model runs without error, but the solution fields for yvel and tmpr both return only zeros. If I replace the flux condition with a temperature condition (i.e. defn flux_loading\$ii flux func \$flux_scale becomes defn flux_loading\$ii tmpr func \$flux_scale), I see the expected elastic wave solutions.

However, I'd prefer to use the flux condition if possible. Am I missing something in how I set up this boundary? Any advice for debugging this problem?

Thanks,

John

`c General conditions for mechanicsc Set to approximate an infinitely long free plateboun   side xmin symm   side xmax absr   side ymax free   endc Flux condition for thermal at y = 0c Apply the flux boundary condition element-by-element,c scaling the loading according to the spatial location.do flux_loop ii 1 \$i2-1 1   symb #get { rxcrd rycrd rzcrd } crdnode \$ii 1   symb #get { flux_scale } histval spatial_data \$rxcrd   boun       defn flux_loading\$ii flux func \$flux_scale      node \$ii \$ii+1 1 1      end   end\$ flux_loopc Set a fixed temperature at one element boundaryc Presumably, all the edges of the thermal window c enforce natural (Neumann, flux = 0) boundary c conditions, which would make an implicit thermalc solve singular. Fixing one side should renderc the problem well-posed. To do this, set the c xmax side to a reference temperature.data hist dummy_const 2   0.0 1.0   1.0 1.0boun    defn fixd_tmpr tmpr dummy_const \$Tref   node \$i2 \$i2 \$j1 \$j2   end`

### 2 comments

• Official comment

Hi John.

This is tricky to debug without the code. Could you please share your files and any dependent files via your preferred file sharing service and I can take a look for you.

Best Regards,

Chloe

• Hi John, have you been able to solve this? - I experience the same issue.
Best regards, Clemens

Please sign in to leave a comment.